You have already been given the answer (more than 1 in fact)
here[
^]. Do
not convert file contents to
CString
s unless you know that the data is pure text. And even if you do know that, it is not a sensible idea. Spend some time studying file handling in computers and how to manage binary data.