Migration to VC.NET
-
hi friends, My question is related to VC.NET. I am working on VC++ on my application since last 1 yr. Now we are migrating to VC.NET. In the process, i am getting 100 errors related to T2A macro. the macro converts to W2A under unicode build. the error is
"error C2664: 'T2A' : cannot convert parameter 1 from 'CString' to 'LPTSTR'"
. the same line of code was working well/ works well in VC 6 env. the code isxmlSetProp(relListNode, SAFE_CAST("rid"), SAFE_CAST (T2A(relID)));
Please ignore the XML related stuff. The area of problem isT2A(CString)
. If anyone knows any solution, please help. ;) Thnaks and regards. Vikram -
hi friends, My question is related to VC.NET. I am working on VC++ on my application since last 1 yr. Now we are migrating to VC.NET. In the process, i am getting 100 errors related to T2A macro. the macro converts to W2A under unicode build. the error is
"error C2664: 'T2A' : cannot convert parameter 1 from 'CString' to 'LPTSTR'"
. the same line of code was working well/ works well in VC 6 env. the code isxmlSetProp(relListNode, SAFE_CAST("rid"), SAFE_CAST (T2A(relID)));
Please ignore the XML related stuff. The area of problem isT2A(CString)
. If anyone knows any solution, please help. ;) Thnaks and regards. VikramThere is no conversion for CString to a non-const string. Reading the help, it looks like you need to use the T2CA macro.