Append one string at begin of another
-
char string1 = "Hello"; char string2 = "I am scolinks"; strcat(string1,string2); SetDlgItemText(hwnd,IDC_APPENDED, string1);
I hope this helps.... Well... I am a beginner ... -
Maybe I'm missing the point of your question? :confused:
std::string orig = "foo";
std::string ins = "String to insert at beginning ";
/* ... */
std::string combined = ins + orig;- Mike
-
strcat() appends string2 to end of 1st string i need some function which does opposite. but thanks anyway.
Duh:|
strcat(string2,string1);
See msdn Library[^]:sigh: John Hudson An imaginary Chris Maunder standing in front of mirror is misquoted remarking: Nothing says "you're not normal" more than the little things. :wtf: http://www.rainbow-innov.co.uk[^] -
Maybe I'm missing the point of your question? :confused:
std::string orig = "foo";
std::string ins = "String to insert at beginning ";
/* ... */
std::string combined = ins + orig;- Mike
-
char string1 = "Hello"; char string2 = "I am scolinks"; strcat(string1,string2); SetDlgItemText(hwnd,IDC_APPENDED, string1);
I hope this helps.... Well... I am a beginner ...:confused::confused::confused: Nice buffer overrun there ;) --Mike-- Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber Ericahist updated (again) Sep 6!