error: cannot convert 'std::string' to 'std::string*' in assignment??
This is weird...
My compiler just gave me the following message:
Quote:
error: cannot convert 'std::string' to 'std::string*' in assignment
in regards to this code:
Code:
string* CenumOperations::getEnum() {
string* pEnumStrings = enumStrings; //get a pointer to the string member 'enumStrings'
return pEnumStrings; //return the pointer
}
The error is at the line where I create a string pointer and initialize it to point at the 'enumStrings' member string of the class "CenumOperations" in the same line.
And if, I change it to this instead:
Code:
string* CenumOperations::getEnum() {
string* pEnumStrings = NULL;
pEnumStrings = enumStrings; //get a pointer to the string member 'enumStrings'
return pEnumStrings; //return the pointer
}
there's no change. Still the same error.