468,484 Members | 1,792 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,484 developers. It's quick & easy.

simple string question...

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
Mar 20 '08 #1
0 920

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Scott | last post: by
2 posts views Thread by Raskolnikow | last post: by
51 posts views Thread by Alan | last post: by
27 posts views Thread by Paulo da Silva | last post: by
30 posts views Thread by galiorenye | last post: by
10 posts views Thread by Phillip Taylor | last post: by
17 posts views Thread by Chris M. Thomasson | last post: by
reply views Thread by NPC403 | last post: by
2 posts views Thread by gieforce | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.