View Single Post
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 04-09-2016 , 17:38   Re: [SNIPPET] Detecting button presses (and releases)
Reply With Quote #12

True, but since this is the Snippets and Tutorials section and many newcommers take code from here I suggest that such bad habits like defining variables inside loops would be avoided. No static needed, the best thing would be to declare the variable outside the loop.
__________________
Quote:
#define true ((rand() % 2)? true: false) //Happy debugging suckers
mottzi is offline
Send a message via MSN to mottzi