Hey,
I'm trying to concatenate strings with const chars (letters in the double quotes). I've tried using the + way, the sprintf, and strcat. None work... An example piece below...
Code:
#include <iostream>
#include <string>
using namespace std;
int main ( int argc, char *argv[])
{
string word1 = "this is a string";
string word2;
word2 = "hello" + word1 + "\n";
return 0;
}
***not my actual code, it's just extremely similar to it***
That's what I'm trying to do... can anyone help (i don't want to use c-strings)
Thanks in advance,
Guitarist809