This is compiler dependent, so I can't be too helpful... but I can give you an example of how I did something like this in DJGPP...
Code:
struct charac
{
char charac;
char color;
};
My video buffer was an array of these structures, and to display the screen, I used the puttext function...
Code:
puttext (x_offset, y_offset, x_offset - 1 + Disp_Width,
y_offset - 1 + Disp_Depth, map);
To just print text with certain attributes however, I suspect I'd have ended up using a different function...
Code:
textattr(BLINK | WHITE);
putch('1');
All this might be helpful if you're using the same compiler as me... but in all likelyhood, you are not. What I suggest is finding a description of your compiler's library functions, and look for ones for console IO. Reading those help files is pretty much the only way to get this done really.