how to output a for loop in a text box in visual studio widows application using c++? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

how to output a for loop in a text box in visual studio widows application using c++?

I want to cout all the for loop results in a one text box in visual studio using c++ but the only thing wish apears in that text box is the only last value in the loop

3rd Jul 2016, 12:26 PM
Anas Ahmad
Anas Ahmad - avatar
3 Answers
+ 1
You have to refresh the visual components (the text box or the contener where the text box is) each time the statement inside the for loop change the text box value. There should be a .refresh or .show method on the text box o window object where the text box is that will do the trick.
3rd Jul 2016, 6:27 PM
Nelson Urbina
Nelson Urbina - avatar
0
You need to put the cout statement inside the loop, not outside it. Hope this helps :)
3rd Jul 2016, 2:35 PM
Mateja Milošević
Mateja Milošević - avatar
0
How about you get another app for C++ or learn how to code in both python and C++?
3rd Jul 2016, 8:49 PM
sophie
sophie - avatar