I know this code should compile right it does fine in dev c++, but for some reason it can't find the header file iostream? Is there something different that you have to do in codeblocks or something?
I know this code should compile right it does fine in dev c++, but for some reason it can't find the header file iostream? Is there something different that you have to do in codeblocks or something?
are u sure that u started with
#include <iostream>
?
The CodeBlocks installation installs a compiler by default (a GCC variant, I'm not sure offhand which one). Since different compilers and compiler versions often rely on a set of environment variables being set, it is quite possible there is a conflict between the compiler associated with Dev C++ and the one with codeblocks. These sorts of problems can also happen if you configure CodeBlocks to use another compiler. Look at the compilation options (within project settings).
If you've selected a different (non-default) compiler for CodeBlocks to use, check the age of that compiler. Some older compilers (dating from mid 90s and earlier) do not support <iostream>.
I found out what the problem was... tough i specified it to work for c++ programs for come reason it was trying to compile it as c code therefore it didnt work... I changed that and now it works
Compiler mix ups are super annoying, I had this same problem with installing OpenGL and Glut, I ended up doing system restore and just doing OpenGL on a different computer.