Just watched a short video on creating a timer in c++. It looks a decent program to a beginner but i'm hoping a more experienced coder can tell me why it is wrong.
So far this forum has taught me when writing c++ you should be killed for using 'system' commands, and something to do with making variables public.
The variable named milliseconds is storing deciseconds, not milliseconds. It is not very accurate because Sleep(100) can take more time than 100 milliseconds, and it doesn't take into account that the program code takes time to run, so the timer will run slightly too slow.