Here is my code:
std::string resolve_email(int *email){ char* c = new char[email.length() + 1];//error: request for member 'length' in 'email', which is of non-class type 'int*' for(int i = 0; i < email.length(); i++){ c[i] = email[i];//error: request for member 'length' in 'email', which is of non-class type 'int*' } return std::string(c); } I get when I compile the error (added to the code as a comment). What is wrong here?
emailin the typestd::string. Where did you get theemailargument in the form of an array of integers? - avp