cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Windows Programming
How to output value of variable to the w
How to output value of variable to the windows' window?
May 26, 2016 at 7:04pm UTC
mforceew
(3)
How to output value of variable to the windows' window?
In console application there is 'cout' function.
May 26, 2016 at 8:19pm UTC
Thomas1965
(4571)
You can use TextOut.
https://msdn.microsoft.com/en-us/library/windows/desktop/dd145133%28v=vs.85%29.aspx
May 26, 2016 at 9:50pm UTC
mforceew
(3)
But textout can't output int without conversion to char.
Is it possible to do it without conversion?
May 27, 2016 at 8:26am UTC
Thomas1965
(4571)
No, you can output only text and images. However converting an int to a char is easy - either use itoa or std::to_string
May 27, 2016 at 9:17am UTC
Chervil
(7320)
In console application there is 'cout' function.
cout makes use of the conversion capabilities of the c++ stream. You could use that capability on its own by using a std::ostringstream, which sends the output to a string instead of to the console.
Topic archived. No new replies allowed.