system( ) not working

Write your question here.
I recently got the latest version of dev c++, because I upgraded to windows 8. Now, the compiler won't recognize any system( ), like system("cls"). When I try to compile this error comes out:

[Error] 'system' was not declared in this scope

I tested with a small program on PC with windows 7, using dev c++ 4.9.2. Then I tried it on the new dev c++, and it didn't work because of that error with system().

Does anyone know how to fix this?
You should #include <cstdlib> . Then you can use std::system() (or add using namespace std; and use system() directly). But be aware of the problems that come with system():
I added that library. It compiles now, but a new error pops out now. Now it says that the executable file is not compatible with my Window's version.

Btw, that thread you linked me was very interesting. I use system ( ) for changing the color and font, and for clearing screen. I know there are some functions to change font color in c++, so I guess I'll have to get used to it. But how do I clear my screen now? Is there other way?
move the cursor position and then use '\r' unless you want to use just 1 line the whole time you do not need to move the cursor at all.
Topic archived. No new replies allowed.