Connecting Tech Pros Worldwide Forums | Help | Site Map

simple string question...

Alexander Dong Back Kim
Guest
 
Posts: n/a
#1: Mar 20 '08
Hi all,

I wrote a function which has a parameter of "string". When I send the
string, can I do like the below?

void Show::caller(void)
{
string str = "This object's address is " << this;
}

void Show::show_message(string str)
{
cout << str;
}

I got errors (obviously).

What would be the solution for this? Any suggestions?

Best regards,
Alex

Closed Thread


Similar C / C++ bytes