C++ Console Color Change Over Time

Hello :D

I am making a console app in DEV C++ and I am trying to make it so that the backround color of the application changes every 500 milliseconds. I have tried:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <cstdlib>
#include <iostream>
#include <windows.h>



int main(){
using namespace std;


loop:
system("color 1f");
Sleep(500);
system("color ff");
Sleep(500);
goto loop;

}


This did not seem to work. Is there another solution?

Thanks for any help,

Muhasaresa
closed account (zb0S216C)
Don't use Dev-C++ as it's old, very old. Upgrade to VC++ 2010/08 or Code::Blocks. Also, don't use goto as it's been deprecated.

You said: This did not seem to work. Why exactly?

Wazzak
Oh, sorry, I was silly and failed to notice that "color ff" does not exist.

Thanks for the help anyway :D

Muhasaresa
Topic archived. No new replies allowed.