SDL while loop confusion

hello, i was wondering why in SDL where you have your main game loop, it doesnt do the code billions of times like a normal loop..

eg:

1
2
3
4
5
6
7
8
9
10
11
12
13
...
bool run =true;

while (run ==true)
{
//some events{}

//Openg 2d rendering{}

cout <<"hi";

}
SDL_Quit();

This all only happens once. It keeps going as long as the window is closed, of course. but doesnt keep repeated if you know what i mean.
Thankyou
but doesnt keep repeated if you know what i mean.

No, not really.
Your loop will continue running until the condition becomes false or until it is exited via break or an exception or until the program is terminated (e.g. by calling exit or abort).
but have you coded in SDL and done like the main loop where everything goes?
Still no idea what you're asking.
have you coded in SDL before?
I have coded in SDL and the loop will behave as it always does in C++.
Topic archived. No new replies allowed.