MCPcopy Create free account
hub / github.com/Extra-Creativity/Modern-Cpp-Basics / checkSPrintf

Function checkSPrintf

08-String & Stream/code/Profile.cpp:20–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19
20static void checkSPrintf(int num)
21{
22 for (int idx = 0; idx < num; ++idx)
23 {
24 int i = 42;
25 double d = 7.7;
26 char buf[100] = { '?', '?', '?', '?', '?', '?', '?',
27 '?', '?', '?', '?', '?', '?' };
28 sprintf(buf, "%d %f", i, d);
29 if (num == 1)
30 {
31 std::cout << buf << '\n';
32 return;
33 }
34 }
35}
36
37static void checkOStringStream(int num)
38{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected