saving a CString to binary file with trailing spaces
Heres what i want to happen except i want it to happen with a CString instead of a char :
the output has 'Bob .' (with the trailing spaces).
char name = "Bob ";
ofstream fout(filename, ios::binary);
when i try this with CString it give me 'Bob.......' (with null's instead of spaces)
I know that CString doesn't have the trailing spaces and is only 'Bob'.
How do i either tell CString to be 10 spaces no matter what, or copy CString to Char and have the spaces, or some other way of fixing it ;-)