T. Crane <tr**********@gmail.comwrote in message...
>
So it seems that my problem is definitely in the Config function. The
filename parameter that is passed to Config() ends up going to another
function called CreateFile. CreateFile's first parameter is of the
type LPCTSTR, and there is some issue in coverting my const char * to
the LPCTSTR type. Something to do with Unicode. I dunno. Any help
understanding this is appreciated.
thanks, trevis
If it's a wide-char, try 'std::wstring'.
There's also the 'vector-trick':
std::vector<TCHARMyString( 1024 ); // be sure it's big enough
LPCTSTR pwString = &MyString.at(0);
Try some tests to find out what you are using:
char Ch( 'A' );
wchar_t wCh( 'A' );
LPCTSTR pS = &Ch;
LPCTSTR pwS = &wCh;
Which one does not compile? (comment-out one at a time)
TCHAR dummy('A');
std::cout<<"sizeof(dummy)="<<sizeof(dummy)<<std::e ndl;
std::cout<<"sizeof(TCHAR)="<<sizeof(TCHAR)<<std::e ndl;
What is the output of those lines?
If 'Config()' is something you wrote, post it.
--
Bob R
POVrookie