Is my this code is dengerour for my computer ?

i write a programme to print a loading bar in console but someones tell me it might be dengerous for computer. please look at this and tell me how can it be dengerous?

1
2
3
4
5
6
7
for(int i = 0; i<40; i++)
  {
          cout<<"-";
          Sleep(100);
          }
             
          


he said that you are trying to sleep your pc in intervals which can cause serious effects. please comments
It isn't trying to sleep the pc. It sends the current program to sleep. During that time, the rest of the pc works as normal.
Topic archived. No new replies allowed.