Thank to Gary's solution giving me idea.
I have tested it. If there is any bug, just tell me.
This is Gary's link: http://garydeng.tumblr.com/
void Console::display(const char* str, int row, int col, int fieldLen){
for(setPos(row, col),row=0;fieldLen==0?(str[row] != 0):(row<fieldLen);row<strlen(str)?(putChar(str[row])):(putChar(' ')),row++);
}
It would be nice to add a link to Gary's post.
ReplyDeleteGood job....
YES SIR. I update it.
Delete