i had a problem with this earlier...but before anyone answered i suddenly figured it out...but then i came across another problem...
how do i stop the color from "bleeding" over onto the next variable in the array?
Code:#include<iostream> #include<windows.h> using namespace std; #define fgreen SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE ),FOREGROUND_GREEN) #define fblue SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE ),FOREGROUND_BLUE) char fgrn(char a) { fgreen; return a; } char fbl(char a) { fblue; return a; } char grass='#'; char charL='@'; #define g fgrn(grass) #define c fbl(charL) int main() { char ffg[2][2]={{c,g}, {g,c}}; cout<<ffg[0][1]<<ffg[1][1]<<endl; return 0; }