does input.getline(outorin, 8) grab 7 or 8 characters? Eg, does it need an extra number so it can tack a null on the end?
does input.getline(outorin, 8) grab 7 or 8 characters? Eg, does it need an extra number so it can tack a null on the end?
input.getline(outorin, 8) will read 7 characters from the input stream and then use the 8th to tag a nul on the end.
Just a quick clarification on null and nul because there is a difference. Here's how I learned it:
The one 'L' NUL ends an ASCII string.
The two 'L' NULL points to no thing.
The three 'L' NULLL means check your spelling.
It's all very subtle, but NULL is all bits zero and NUL is '\0'
-Prelude
My best code is written with the delete key.