Starting the program

This is a discussion on Starting the program within the C++ Programming forums, part of the General Programming Boards category; Well i am programing a game. And now i am deep into different functions and multiple if's.. The problem is ...

  1. #1
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    Posts
    1,683

    Starting the program

    Well i am programing a game. And now i am deep into different functions and multiple if's.. The problem is after the game ends i want it to start again. I am not able to implement loops, goto,break etc to do this because of the situation and the structure of the program. Is there any way i can call some kind of function from any of the functions to make the program start again fresh....

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    I would suggest that if you can't implement some kind of loop/branch to return to the start of your code, then you have a design problem. Why can't you loop?
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    Posts
    1,683
    Well the problem is..
    I have many functions at the begining... Almost 15v to 16 function. And at the end i have the main calling about 4 functions which in turn call the other functions to do the job. When my program ends it ends in one of the uppermost functions. It is like i have been calling the functions one inside the other. Now the problem is starting the program again from the program itself..



    Note:- Actually it is a game.. It is not yet complete. When you choose the tic tac toe game and play it after the game finishes.. I want the it to come to the initial screen. Calling one of the function start() that starts the game in this progam does not work properly. I have attached it along with the exe and the source please help... It would be great if you could modify this and post it ...
    Attached Files Attached Files

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Starting C++;First Program
    By Caliban in forum C++ Programming
    Replies: 5
    Last Post: 04-11-2009, 02:41 PM
  2. Starting a program
    By mcgeady in forum C++ Programming
    Replies: 3
    Last Post: 02-25-2006, 12:52 PM
  3. starting program
    By Ideswa in forum C++ Programming
    Replies: 3
    Last Post: 02-20-2006, 02:36 PM
  4. I need some help with my program please.
    By agentxx04 in forum C Programming
    Replies: 9
    Last Post: 09-26-2004, 08:51 AM
  5. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 11:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21