void printstr(char string[]) { int i; for (i = 0 ; string[i] != '\0' ; i++) cout << string[i]; }
void readword(char string[], int maxch) { int i = 0; char ch; ch = cin.get(); while (ch == '\n' || ch == '\t' || ch == ' ') ch = cin.get(); while (ch != '\n' && ch != '\t' && ch != ' ' && i < maxch) { string[i] = ch; ch = cin.get(); i++; } string[i] = '\0'; }
Email Me |
Office Hours |
My Home Page |
Department Home |
MCC Home Page
© Copyright Emmi Schatz 2002