Connecting Tech Pros Worldwide Help | Site Map

simple string question...

  #1  
Old March 20th, 2008, 02:55 AM
Alexander Dong Back Kim
Guest
 
Posts: n/a
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 Threads
Thread Thread Starter Forum Replies Last Post
[C] simple string question Alan answers 51 November 14th, 2005 03:03 AM
very simple string* question cppaddict answers 7 July 22nd, 2005 12:26 PM