Click here to Skip to main content
15,892,059 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalproblem while assigning CString(more explanation) Pin
a_david1233-Aug-05 23:11
a_david1233-Aug-05 23:11 
GeneralRe: problem while assigning CString(more explanation) Pin
Marc Soleda3-Aug-05 23:56
Marc Soleda3-Aug-05 23:56 
GeneralRe: problem while assigning CString(more explanation) Pin
Eytukan3-Aug-05 23:57
Eytukan3-Aug-05 23:57 
GeneralRe: problem while assigning CString(more explanation) Pin
Halawlaws3-Aug-05 23:59
Halawlaws3-Aug-05 23:59 
GeneralRe: problem while assigning CString(more explanation) Pin
Eytukan4-Aug-05 0:10
Eytukan4-Aug-05 0:10 
GeneralRe: problem while assigning CString(more explanation) Pin
toxcct4-Aug-05 0:30
toxcct4-Aug-05 0:30 
GeneralRe: problem while assigning CString(more explanation) Pin
Eytukan4-Aug-05 2:17
Eytukan4-Aug-05 2:17 
GeneralRe: problem while assigning CString(more explanation) Pin
4-Aug-05 7:08
suss4-Aug-05 7:08 
If both sides are char* then you can also do this:

char * first = "first";
char * second = "second";
CString str = CString(first) + second;

[EDIT]
I see there was some confusion about this post. So, for anyone looking at this the first time will understand better:

At first glance it may seem that I'm adding two char* pointers together. But in reality it is not. The "first" string is being converted to a CString using a temporary object and then the CString addition operator is being called to append the second string. Finally the resulting CString (first and second combined) is assigned to "str".
GeneralRe: problem while assigning CString(more explanation) Pin
toxcct4-Aug-05 20:12
toxcct4-Aug-05 20:12 
GeneralRe: problem while assigning CString(more explanation) Pin
GKarRacer5-Aug-05 9:04
GKarRacer5-Aug-05 9:04 
GeneralIcon problem Pin
Halawlaws3-Aug-05 23:04
Halawlaws3-Aug-05 23:04 
GeneralRe: Icon problem Pin
Eytukan4-Aug-05 0:07
Eytukan4-Aug-05 0:07 
GeneralRe: Icon problem Pin
Graham Bradshaw4-Aug-05 0:16
Graham Bradshaw4-Aug-05 0:16 
GeneralRe: Icon problem Pin
Halawlaws4-Aug-05 1:00
Halawlaws4-Aug-05 1:00 
GeneralRe: Icon problem Pin
Halawlaws4-Aug-05 1:09
Halawlaws4-Aug-05 1:09 
GeneralRe: Icon problem Pin
toxcct4-Aug-05 1:25
toxcct4-Aug-05 1:25 
GeneralRe: Icon problem Pin
Halawlaws4-Aug-05 1:27
Halawlaws4-Aug-05 1:27 
GeneralRe: Icon problem Pin
toxcct4-Aug-05 1:31
toxcct4-Aug-05 1:31 
GeneralRe: Icon problem Pin
Eytukan5-Aug-05 0:04
Eytukan5-Aug-05 0:04 
GeneralRe: Icon problem Pin
Halawlaws5-Aug-05 0:09
Halawlaws5-Aug-05 0:09 
GeneralRe: Icon problem Pin
GKarRacer5-Aug-05 9:25
GKarRacer5-Aug-05 9:25 
GeneralRe: Icon problem Pin
Halawlaws7-Aug-05 20:33
Halawlaws7-Aug-05 20:33 
Generalnewbie : Creating Owner Draw Menu Pin
DBase_3-Aug-05 22:53
DBase_3-Aug-05 22:53 
GeneralRe: newbie : Creating Owner Draw Menu Pin
toxcct4-Aug-05 1:08
toxcct4-Aug-05 1:08 
GeneralWindows Spy++ Utility Pin
ddmcr3-Aug-05 22:48
ddmcr3-Aug-05 22:48 

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.