rkcth
asked on
Read CFile into CString
I need a file in CString format. I am using CFile. Could someone please tell me how to get the information stored in the CFile into a CString.
Thanks,
Sincerely Robert
Thanks,
Sincerely Robert
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
then you may set the buffer large enough, such as:
char szBuffer[myFile.Length]
thank u for ur points, that is what i like
^@^
char szBuffer[myFile.Length]
thank u for ur points, that is what i like
^@^
freshmeat,
char szBuffer[myFile.Length]
Have you actually tried this code? I do not believe this code will work. You cannot create an array dynamically like you're trying to. How else would you do this?
I actually have the same problem, but also do not wish to repeated read the file and add it to the string.
Cheers,
Cameron
char szBuffer[myFile.Length]
Have you actually tried this code? I do not believe this code will work. You cannot create an array dynamically like you're trying to. How else would you do this?
I actually have the same problem, but also do not wish to repeated read the file and add it to the string.
Cheers,
Cameron
ASKER