By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,731 Members | 1,123 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,731 IT Pros & Developers. It's quick & easy.

Interactive C need to repeat program

P: n/a
So I am making a lego robot, that collects pucks using a handy board and interactive C. Once it collects one puck though it repeats the same step of finding the base over and over. Is there any way that I can get it to reset its values and start the program from the beginning, so it will continually keep find the pucks. If you want I can send the code for you to look at.
any help would be great
Thanks
Jack
Oct 24 '10 #1
Share this Question
Share on Google+
1 Reply


weaknessforcats
Expert Mod 5K+
P: 9,197
Just rename your main() function to something else.

Then write a new main() with a loop in it. Call the old main from inside that loop.
Oct 24 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.