include files

Our admin has upgraded our OS solaris system to 5.11 but no more I can compile any trivial or non-trivial code. I'm trying to compile a trivial c++ program(a Helloworld program) but It gives error indicating that include files do not exist (in this trivial case <stdio.h>), it starts compiling but it gives this compile error: "error: stdio.h: No such file or directory". Something interesting is that GCC compiler automatically looks into these folders:

/sw/gcc/bin/../lib/gcc/sparc-sun-solaris2.10/4.0.4/include/c++
/sw/gcc/bin/../lib/gcc/sparc-sun-solaris2.10/4.0.4/include/c++/sparc-sun-solaris2.10
/sw/gcc/bin/../lib/gcc/sparc-sun-solaris2.10/4.0.4/include/c++/backward
/sw/gcc/bin/../lib/gcc/sparc-sun-solaris2.10/4.0.4/include
/usr/sfw/include
/usr/include

however stdio.h is in this directory:

/sw/gcc/bin/../lib/gcc/sparc-sun-solaris2.9/4.0.4/include

It seems reasonable for GCC to look into the new 2.10 OS folder rather than the old 2.9 OS, but the include paths are not as populated as the old one, I tried to copy some of the include files from the old OS path into the new OS path, but it gave Permission denied, I also tried to compile it using the -I option but like a chain event it starts giving error for another series of .h files that stdio.h calls them.
Any help would be highly appreciated.

c++ uses header files with names that are different from C. There is no stdio.h for example. You cannot compile C and C++ code together in one file. You are using C header file names and trying to compile c++.