Click here to Skip to main content
15,881,833 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionUnicode.. Pin
p_196021-Mar-09 7:36
p_196021-Mar-09 7:36 
AnswerRe: Unicode.. Pin
CPallini21-Mar-09 7:48
mveCPallini21-Mar-09 7:48 
AnswerRe: Unicode.. Pin
Jörgen Sigvardsson21-Mar-09 22:43
Jörgen Sigvardsson21-Mar-09 22:43 
Questionconvert Pin
durban221-Mar-09 5:07
durban221-Mar-09 5:07 
QuestionRe: convert Pin
CPallini21-Mar-09 5:13
mveCPallini21-Mar-09 5:13 
AnswerRe: convert Pin
Dominik Reichl21-Mar-09 5:14
Dominik Reichl21-Mar-09 5:14 
AnswerRe: convert Pin
Akt_4_U21-Mar-09 5:52
Akt_4_U21-Mar-09 5:52 
AnswerRe: convert Pin
Eytukan21-Mar-09 22:02
Eytukan21-Mar-09 22:02 
CHIVOTIOV wrote:
/ error C2664: 'wcscpy' : cannot convert parameter 1 from 'char *' to 'wchar_t *'


Just a padding to the other replies here. As the above lines says, You are trying to squeeze a 2 Byte string (UNICODE) into a single byte string(ANSI).

char , std::string , etc by default belong to the single byte representation.
wchar_t, std::wstring, etc represent UNICODE representation.

TCHAR is "neutral" based on the scheme used, it switches type accordingly. If you define # UNICODE in the setting, the string becomes 2 byte reps. If you don't define it, it becomes single byte. Also when you use TCHARs, you should use strings apis specific to TCHARs. (like _tcscpy) that assures complete independence to your character-set implementations.

Similarly, CString switches types based on the project character-set settings.(UNICODE/Single-byte).

Now you have defined UNICODE in your project settings but trying a cross-copy operation. So just figure out what needs to be done.. Smile | :)

He never answers anyone who replies to him. I've taken to calling him a retard, which is not fair to retards everywhere.-Christian Graus

Questionhow to write list control data in text file in MFC Pin
amit14aug21-Mar-09 4:38
amit14aug21-Mar-09 4:38 
AnswerRe: how to write list control data in text file in MFC Pin
Rajesh R Subramanian21-Mar-09 4:41
professionalRajesh R Subramanian21-Mar-09 4:41 
Questionpointer-to-array Pin
korte2521-Mar-09 3:49
korte2521-Mar-09 3:49 
AnswerRe: pointer-to-array Pin
CPallini21-Mar-09 4:09
mveCPallini21-Mar-09 4:09 
GeneralRe: pointer-to-array Pin
korte2521-Mar-09 6:09
korte2521-Mar-09 6:09 
GeneralRe: pointer-to-array Pin
CPallini21-Mar-09 6:25
mveCPallini21-Mar-09 6:25 
GeneralRe: pointer-to-array Pin
korte2521-Mar-09 6:57
korte2521-Mar-09 6:57 
GeneralRe: pointer-to-array Pin
CPallini21-Mar-09 7:41
mveCPallini21-Mar-09 7:41 
GeneralRe: pointer-to-array Pin
korte2521-Mar-09 7:44
korte2521-Mar-09 7:44 
GeneralRe: pointer-to-array Pin
CPallini21-Mar-09 7:48
mveCPallini21-Mar-09 7:48 
AnswerRe: pointer-to-array Pin
Stuart Dootson21-Mar-09 12:29
professionalStuart Dootson21-Mar-09 12:29 
GeneralRe: pointer-to-array Pin
korte2522-Mar-09 2:30
korte2522-Mar-09 2:30 
QuestionCreateDirectoryW() Pin
p_196021-Mar-09 3:47
p_196021-Mar-09 3:47 
AnswerRe: CreateDirectoryW() Pin
«_Superman_»21-Mar-09 4:05
professional«_Superman_»21-Mar-09 4:05 
GeneralRe: CreateDirectoryW() Pin
p_196021-Mar-09 4:17
p_196021-Mar-09 4:17 
AnswerRe: CreateDirectoryW() Pin
Rajesh R Subramanian21-Mar-09 4:28
professionalRajesh R Subramanian21-Mar-09 4:28 
QuestionHow to use Borland C DLL in C#.NET Pin
dataminers21-Mar-09 3:28
dataminers21-Mar-09 3:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.