Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I am trying to Concatenate two strings in a VS.NET 2003 C++ Windows application, and I cannot seem to get it to work. Does anyone have any ideas? The statement doesn't do anything...the compiler does not blow up either! The MessageBox just shows the first string! :(

 

{

String *msg = "Customer Order\n";

msg->Concat(S" Processors\n");

MessageBox::Show(msg);

}

I'd rather be riding than working
Posted

For anyone else who runs into this, this is how I got it to work:

 

{

String* msg = "Customer Order\n";

msg = String::Concat(msg, S" Processors\n");

MessageBox::Show(msg);

}

 

Not quite sure hom to get the "msg->Concat(S"String2");" to work, but if anyone figures it out, I would like to know.

Good Luck!

I'd rather be riding than working
Posted

I see. So I have to code it as such:

{

String* msg = "Customer Order\n";

msg = msg->Concat(msg, S" Processors\n");

MessageBox::Show(msg);

}

Thanks Divil

I'd rather be riding than working

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...