Well first you need to be able to:
- Open two files,, one for reading and another for writing.
http://www.cplusplus.com/reference/i...ream/open.html
http://www.cplusplus.com/reference/i...ream/open.html
- Read one character at a time from the infile.
http://www.cplusplus.com/reference/i...tream/get.html
- Process that character to determine if it is a second, third, etc. space.
If yes write it, if no get the next character.
A space can be identified by the ascii value 0x20 or you can also use ' ' as in:
if( c == 0x20 ) . . . or . . . if( c == ' ' ) ...both are equivilent.
- Write desired characters to the outfile.
http://www.cplusplus.com/reference/i...tream/put.html
- Finally you will need to close the files (see open.html's above)