c++ works on DOS so first you need simple color code and keyword for example. if you bored black background and white texts, use that code.
#include <iostream.h>
#include <stdlib.h> //it is header file of "system";
int main(){
system("color b1"); //b1 is color code you can use different color;
cout<<"hello world!!!\n";
system("pause");
return 0;
}
system("color b1"); // b is background color 1 is text color here are colors of code
No comments:
Post a Comment