You can't do this because the type 'char' represents only one character. Which means if you put cA with the letter 'A' its ok but if you put it to 'AB' its not. To get around this you have to make your chars arrays. this is what you should have:
Code:
int main(int argc, char*argv[])
{
char cA[30]; //Notice that now you can put 30 chars in
char cB[30]; //Ya can with this, too
cA = 'A';
cB = '\\x6'; //put the extra \ so that the compiler prints one
strcat(cA, cB); //You don't need cA =
cout << cA;
return (0);
}
/* This should print: 'A\x6' */
I hope this helps you. If it doesn't just tell me