I checked and there was a file called iostream (no extension) in C:\Program Files\CodeBlocks\include\c++\3.4.4, but just in case, I uninstalled CodeBlocks and reinstalled it to C:\CodeBlocks and did a separate install of MinGW to C:\MinGW using the MinGW-3.1.0-1.exe installer. Unfortunately this didn't fix the problem. I went to try compiling the default "Win32 GUI Application" and got this result:
Compiling: main.cpp
In file included from C:/MinGW/include/windows.h:47,
from main.cpp:1:
C:/MinGW/include/stdarg.h:6:24: stdarg.h: No such file or directory
In file included from C:/MinGW/include/string.h:40,
from C:/MinGW/include/winnt.h:37,
from C:/MinGW/include/windef.h:246,
from C:/MinGW/include/windows.h:48,
from main.cpp:1:
C:/MinGW/include/stddef.h:6:24: stddef.h: No such file or directory
In file included from C:/MinGW/include/winnt.h:37,
from C:/MinGW/include/windef.h:246,
from C:/MinGW/include/windows.h:48,
from main.cpp:1:
What confuses me about this is that it seems to find windows.h and a few others that are in C:\MinGW\include, but it fails to find stdarg.h which is in the same directory. Any ideas what would cause it to find some and not others?