do {} 13% CPU usage ?!?!?!?
my PC uses 13% of CPU
why what does PC while this???
Code:
#include <iostream>
using namespace std;
int main ()
{
bool game_main_menu = true;
do
{}
while ( game_main_menu == true );
int z;
cin >> z;
return 0;
}
I don't get it
when I do that he is out of loop it goes to 0% CPU
Code:
#include <iostream>
using namespace std;
int main ()
{
bool game_main_menu = true;
do
{}
while ( game_main_menu == false );
int z;
cin >> z;
return 0;
}
why I don't get it
I think this is question for experts
PC should do nothing if there is do {}