pprintf() expands to a call to printf() yet it doesn't include cstdio. This leads to the somewhat confusing error seen below:
src/main.cpp: In function ‘int main()’:
src/main.cpp:65:3: error: ‘printf’ was not declared in this scope
65 | pprintf("Hello World!\n");
| ^~~~~~~
user-virtio-net/src/main.cpp:8:1: note: ‘printf’ is defined in header ‘<cstdio>’; did you forget to ‘#include <cstdio>’?
Minimal example of the problem:
#include <pprintpp/pprintpp.hpp>
int main()
{
pprintf("Hello World!\n");
return 0;
}
For me the expected behavior would be for this to work without manually including other headers.
pprintf()
expands to a call toprintf()
yet it doesn't includecstdio
. This leads to the somewhat confusing error seen below:Minimal example of the problem:
For me the expected behavior would be for this to work without manually including other headers.