+ 13
C++ loop
How can I make a function that is repeated each fram of the program in c++? In javascript the equivalent would be "setInterval(my_loop_function,1000/my_FPS_variable);"
2 Réponses
+ 9
That's not what I want, I want a loop that repeats all the time
like a while(true){/*game code here*/} but a while(true) may cause errors right? and I can't know how fast the while is repeating
+ 1
you can write
for( int I=0;I<n;I++) { //call your function here ;}
this statement will call your function n times