Need help making a program keep going.

This is a discussion on Need help making a program keep going. within the C++ Programming forums, part of the General Programming Boards category; I'm just getting started in programming, and i'm trying to make a program that would have a " conversation" with ...

  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    38

    Question Need help making a program keep going.

    I'm just getting started in programming, and i'm trying to make a program that would have a " conversation" with the user. The idea is that it uses a set of if-then statements to respond to a person's input, but every time, after the first comment, the program ends. What I need to know is how to make the program respond to the person's response.



    ex:
    Command Promp: Hi, I'm the computer. What's your name?
    Person: Ted or BIll

    (if ted, the computer says "Hey, I had a broter named ted.
    If Bill, the computer says "Bill, like the old president?")

    The problem is, that here, I don't know how to let the person respond to the computer's statement.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    So what have you done so far?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Katy, Texas
    Posts
    2,309
    Show us what you have so far. Lots of folks on this forum want to know how to do this too.
    Mac and Windows cross platform programmer. Ruby lover.

    Quote of the Day
    12/20: Mario F.:I never was, am not, and never will be, one to shut up in the face of something I think is fundamentally wrong.

    Amen brother!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Making a program run on startup
    By Poincare in forum C Programming
    Replies: 10
    Last Post: 06-21-2009, 01:50 PM
  2. Using variables in system()
    By Afro in forum C Programming
    Replies: 8
    Last Post: 07-03-2007, 01:27 PM
  3. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 07:39 AM
  4. Making interest rate program in C
    By canadas321 in forum C Programming
    Replies: 6
    Last Post: 06-23-2005, 12:59 PM
  5. I need help with making a program which....
    By Tonyukuk in forum C# Programming
    Replies: 1
    Last Post: 04-16-2003, 11:49 PM

Tags for this Thread


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