0
Loop repeating program
i did a loop with a condition to keep repeating my program after answering by a char Y or N and but when the program is repeated it starts with the first data which was in the constructor not the new that I've added to so i 'm asking how can i repeat the program with the data that has been changed
3 Réponses
+ 1
If you have constructor in your loop then you always reset your data. Costructor should be before your loop. You can post your code.
+ 4
Make sure the scope of your variables is in check. Check whether or not you're redefining or reinitialising your variables inside your loop.
+ 1
yes exactly well, i solved the problem all i had to do is to instantiate my object outside the loop thank you guys