C++ timer question
-
hai, I am working on VC++ win32.I am creating a timer that decrements a counter every second(in Dlg Procedure).I have class where I have to reset the value of the timer.I am thinking of how to do this? ie. //main.cpp int g_counter = 10; main() { ///here i decrement the timer every second } // myclass.cpp int myclass::myfunction() { ///here i want to set g_counter = 10;////how should i exactly do it.. }
-
hai, I am working on VC++ win32.I am creating a timer that decrements a counter every second(in Dlg Procedure).I have class where I have to reset the value of the timer.I am thinking of how to do this? ie. //main.cpp int g_counter = 10; main() { ///here i decrement the timer every second } // myclass.cpp int myclass::myfunction() { ///here i want to set g_counter = 10;////how should i exactly do it.. }
manu81 wrote: ///here i decrement the timer every second What function are you using to establish the timer? manu81 wrote: ///here i want to set g_counter = 10;////how should i exactly do it.. You mean besides:
g_counter = 10;
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen