I'm trying to get my program to convert only the first character of each word typed in to caps. here's what I have, could someone give me some clues/pointers on what I am doing wrong please?
Code:#include <stdio.h> #include <iostream> using namespace std; int main (int argc, char *argv[], char **env) { char c, lastc = ' ' ; c = cin.get() ; do { if ( isspace( lastc ) ) cout.put ( toupper( c ) ) ; lastc = c ; c = cin.get() ; } while ( !cin.eof()) ; }