timmay3141
Programmer
How do you concatinate a single char onto the end of a char*? I tried using the strcat function, but the second parameter it takes is char* so I can't just send the character. Here's an example of what I want to do:
#include <conio.h>
#include <iostream.h>
void main()
{
char* str = "Entered character: ";
char ch;
ch = getch();
// concatinate ch onto the end of str
cout << str << endl;
}
How do I do this?
#include <conio.h>
#include <iostream.h>
void main()
{
char* str = "Entered character: ";
char ch;
ch = getch();
// concatinate ch onto the end of str
cout << str << endl;
}
How do I do this?