fileRows is an array of 500 elements. If you want to return the array so that you can later access the n-th element, you should return the pointer to the beginning of the array. For example:
string* Data::fileName(){
return fileRows;
}
Although it is probably better to use:
const string& Data::getFileName(size_t index){
return fileRows[index];
}
Using the first method, you can access the n-th element using:
data.filename()[n];
So, if you want to access the 5th element of the array you should use:
data.filename()[4];
On the other hand, the function MessageBox needs a const char *. So you must call the c_str() method to get the pointer:
Data name(hwnd);
MessageBox(hwnd, name.fileName()[4].c_str(), "About", MB_OK);