Is there a program for a computer where when i press a button it goes up by 1? Or whats the C++ Code? I need to count the number of people who walk through the door of a concert tonight.
Is there a program for a computer where when i press a button it goes up by 1? Or whats the C++ Code?
You should be able to get the calculator applet to do something like that, say with a 1 in the register and M+. At the end, use MR to get the final value.
Of course, there are mechanical, hand-held counters made for just that purpose.
Hope that helps.
Reply:int counter = 0 ;
void onButtonClick() {
counter++ ;
}
Actual implementation details for the button will vary depending on the GUI framework you are targetting.
Reply:Yeh its called....NACK NACK NACK ! ! !
Silly Blake :P
xx
Reply:lol,
I second what liz said.
:]
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment