Thread: Running Once?
View Single Post
  #7   Spotlight this post!  
Unread 23-02-2005, 07:34
SpeakerSilenced SpeakerSilenced is offline
Programming/Electrical Team Member
#0219 (Team Impact)
Team Role: Programmer
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Hackettstown, NJ
Posts: 28
SpeakerSilenced is an unknown quantity at this point
Send a message via AIM to SpeakerSilenced
Re: Running Once?

There is a simpler way of having something only run once...
Code:
int counter = 0;
if (counter == 0)
{
do whatever you want once;
counter++;
}
It will never be executed again unless you set counter = to 0... you can change the variable name too and name it whatever the function is supposed to do such as camera_settings, etc...
__________________
"I want to put a ding in the universe" - Steve Jobs