Week 3: console.display
void Console::display(const char* str, int row, int col, int fieldLen){
unsigned int i;
unsigned int size;
setPos(row, col);
fieldLen > 0 ? size=fieldLen : size=strlen(str);
for(i=0;i<size;i<strlen(str) ? putChar(str[i]) : putChar(' '),i++);
}
Does this count as one line program?
No comments:
Post a Comment