I wish to change the color of my printf statement. I use following code:
#include <stdio.h>
#include <stdlib.h>
void main()
{
system("color e");
printf("An enemy appears\n");
system("color c");
printf("This is an apple.\n");
}
I wish to print the statement which is "An enemy appears" in yellow color and "This is an apple" in red color at SAME time.
But the output isn't what I want.
It just print out "An enemy appears" and "This is an apple" in red color.
Is that the "system" problem?
So how can i print 2 different color of stirngs in same page??