Quote Originally Posted by c_weed View Post
Sorry I meant '\0' not '\n'. I thought I was getting ripped of the last character for the '\0'? For example
Code:
char sentence[20];
cin.get(sentence, 20);
will only let me store 19 characters in sentence. I thought that's because the last element (sentence[19]) is used for the null character ('\0')?
Actually it will let you store 20 characters in a 21 character string. I already posted a blurb on how this works.

cin.get(sentence, 19);

Means that a maximum of 18 characters will be written to string and a zero automatically placed at the 19th place, if you use up the whole string. Please pay attention to the small stuff.

I still recommend std::string.