|
-
January 8th, 2013, 11:34 AM
#2
Re: TCHAR correct usage
Your TCHAR szDir[MAX_PATH] is a local variable within the buttonPush(...) function. It goes out of scope before the buttonPush(...) function returns.
So its content is no more defined.
Use some non-POD type for the path like std::string/wstring or MFC CString class. Or just pass the TCHAR* as a parameter of the buttonPush(...) function.
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|