Error

Jan 21, 2012 at 9:01pm
The error I am getting is on this line:

check(message,new_message);

message is a char array and new_message is a string.

The error is:

cannot convert std::string to std::string* for argument 2

The receiving function is:

void check(char* message, string* new_message)


Thanks in advance.
Jan 21, 2012 at 9:09pm
If you want to pass a pointer to new_message you should use the dereference operator
check(message,&new_message);
Jan 21, 2012 at 10:35pm
Thanks Peter87, that worked.
Topic archived. No new replies allowed.