Help! I need to copy a char array initialized as a string from one array to another, using a function containing one line of code. Here is the code:
#include <iostream>
using namespace std;
void cpystr(char *instr, char *outstr);
void cpystr(char *instr, char *outstr)
{
//Insert line of code here
}
int main()
{
char in[]={'d', 'f', 'g', '\0'};
char out[4];
cpystr(in, out);
cout << "in: " << in << endl;
cout << "out: " << out << endl;
return 0;
}
Thanks!