•      Sign In
• Create Account

### #ActualSparkon

Posted 01 December 2012 - 04:14 AM

I might have misunderstood your question.. But are you asking for a way to concatenate strings and variables together? If so : yes you can!
If the variable is of type string you can do :
std::string s = "hi" + yourstring;


Otherwise .. If it is a number you have to cast it to a string before.

EDIT : the c++ way to convert numbers to integers is the stringstream (just google it ). I'm writing from phone

### #1Sparkon

Posted 01 December 2012 - 04:06 AM

I might have misunderstood your question.. But are you asking for a way to concatenate strings and variables together? If so : yes you can!
If the variable is of type string you can do :
std::string s = "hi" + yourstring;


Otherwise .. If it is a number you have to cast it to a string before.

PARTNERS