int main()
{
char d = 'd';
std::string y("Hello worl");
y.append(d); // this fails
std::cout << y;
return 0;
}
I also tried, but also failed.
int main()
{
char d[1] = { 'd' };
std::string y("Hello worl");
y.append(d);
std::cout << y;
return 0;
}
Sorry for this dumb question, but I've searched around google, what I could see are just "char array to char ptr", "char ptr to char array", etc.
Any kind of help would be appreciated!
Thanks.