The key error is:
In file included from testgpp.cpp:1:
[...]/include/c++/cstdio:52:19: stdio.h: No such file or directory
The fact that G++ is complaining that it cannot find <stdio.h>
(though it leaves the angle brackets out of the message) means you have a compiler configuration problem of some sort. Probably, you are missing a crucial package. I would look to reinstall or update your GCC environment, so that <stdio.h>
ends up being found.
The rest of the problems are consequences of the missing header - the compiler is struggling on without all the information it needs to avoid generating unwarranted errors.
Jonathan Leffler
2010-04-25 06:34:04