Hi everybody. Hope you are all well in the new year.
I'm having trouble with joining two chars and displaying the output. For example
Any clues as to how to do this? Thanks so much.
#include <iostream>
#include <string>
using namespace std;
int main();
{
char a = 'x';
char b = 'y';
//the below gives me a funny symbol. Probably cos it's seeing the binary value of the chars.
cout << a + b << endl;
//I tried turning them to strings like this. But it doesn't work. I get an errory like;
// cannot covert std string to char*;
string c,d;
c = (string)a;
d = (string)b;
strcat(c,d)
cout << c << endl;
}