code not working in codeblocks?

This is a discussion on code not working in codeblocks? within the C++ Programming forums, part of the General Programming Boards category; I know this code should compile right it does fine in dev c++, but for some reason it can't find ...

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>.

If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.