SFML community forums

Help => Graphics => Topic started by: BusinessSloth on February 22, 2012, 06:03:29 am

Title: Set.Text Question
Post by: BusinessSloth on February 22, 2012, 06:03:29 am
I was wondering if with
Code: [Select]
Hello.SetText("Your answer is"); you could put a variable in with it, like with cout
Code: [Select]
cout << "your answer is" << answer << endl;


Thanks
Title: Set.Text Question
Post by: youri801 on February 22, 2012, 08:22:56 am
Try using the forum search feature before posting, your question has already been asked in a couple of threads.

I suggest you to read this thread.

http://www.sfml-dev.org/forum/viewtopic.php?t=5154&postdays=0&postorder=asc&start=0

As you will see you can simply use an std::ostringstream to achieve what you want.
Title: Set.Text Question
Post by: BusinessSloth on February 22, 2012, 08:42:23 am
Ahh, I'll be sure to do that next time. Thank you, I appreciate your help.