// The get function is predefined in iostream. Its // purpose is simply to retrieve one character at // a time from the input buffer, white space and all. // Get does not skip white space, like the stream // extraction operator, but lets the programmer // handle it instead. This is important if the structure // of the input file must be maintained. Recall that cin, // with the stream extraction operator, will skip not // just spaces, but tabs and new lines, leaving all input // essentially on one line. Cin.get() can be used to // capture that information. In your codde, it will look // like this: cin.get(ch); // By itself, this does not seem helpful, but combining // it with other elements, like a while loop, we might // create a structure like this: while (cin.get(ch)) if (ch == ' ' || ch == '\t' || ch == '\n') cout << ch; else{ cout << ch; stringArray[counter] = ch; counter++; } // This structure echos input contents to the screen while // saving the non white space content to a character array, // presumably for some later processing. Despite its simple // nature, cin.get() has many such practical uses.