error C2664: '_wfopen' : cannot convert parameter 1 from 'class CString' to 'const unsigned short *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
if i use fstPayroll = fopen(m_filename + L".txt","w+"); insted of _wfopen..it just takes the decimals values and not strings..such as CString
If I fix the last param (add a L to "w+") you code compiles ok for me.
I do notice the warning about 'unsigned short' rather than wchar_t, which make me wonder about the age of your compiler?
But as mordoran suggests, you should use the tchar.h macros, etc. Consistently!
PS Out of interest, where are you calling this fstream-based code from? MFC provides CStdioFile and CArchive which offer a more "MFC idomatic" way of writing and readin date. This hold especially if this code is in class derived from CDocument.