In C++, I've got a string array variable called:
...
/* set the variable */
string fileRows[500];
...
/* fill the array with a file rows */
while ( getline(infile,sIn ) )
{
fileRows[i] = sIn;
i++;
}
and an object which has this:
string Data::fileName(){
return (fileRows);
}
I would like to make a function which return an array, and after that i would like to call it something like this:
Data name(hwnd);
MessageBox(hwnd, name.fileName(), "About", MB_OK);
But i get this error:
cannot convert 'std::string* {aka std::basic_string}' to 'LPCSTR {aka const char}' for argument '2' to 'int MessageBoxA(HWND, LPCSTR, LPCSTR, UINT)'
If i would like to show the 5. element of the array, how to convert it?