I have tried alot of suggestion solutions to this problem with no success.
I have a const char array, of length 1000, called english_line which containing words seperated by whitespace. This array is passed into a function. This function must be used to implemented the solution as per our assignment brief.
I want to copy the contents of that array, one word at a time into another 2D array, temp_eng_word
char temp_eng_word[2000][50];
int j;
string line = english_line;
string word;
istringstream iss(line, istringstream::in);
while (iss >> word)
{
for (j=0;j<=2000;j++)
{
strcpy(temp_eng_word[j],word);
}
}
`
When I run this, I get the error:
cannot convert 'std::string* *{aka std::basic_string(char)}' to 'const char*' for argument '2' to 'char* strcpy(char*, const char*)'
I have spent the best part of a day just trying to do this problem; obviously I am a relative novice at this.
Any tips or suggestions would be greatly appreciated :)