More qusetions 2 ...

This is a discussion on More qusetions 2 ... within the C++ Programming forums, part of the General Programming Boards category; I seem to be asking alot of questions but C++ is fun ! I was wandering how I could get ...

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    21

    More qusetions 2 ...

    I seem to be asking alot of questions but C++ is fun ! I was wandering how I could get my program to exit whenever 7 is entered and I was wandering about how I would clear the screen when the user wnats to do another calculation.

  2. #2
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    Remember to check the FAQ for your questions
    Here are the answers...
    http://faq.cprogramming.com/cgi-bin/...&id=1043284385
    http://faq.cprogramming.com/cgi-bin/...&id=1043284385

  3. #3
    Banned
    Join Date
    Oct 2004
    Posts
    250
    You could check user imput with a simple if statement and to clear the screen you could use system("cls"); that is if your using windows.

  4. #4
    fuh
    fuh is offline
    Attack hamster fuh's Avatar
    Join Date
    Dec 2002
    Posts
    176
    Code:
    if(input == 7) {
    return 0;
    }
    I think people are forgetting about return these days...
    Seems simple enough for me, and that's saying a lot
    Stupid things pop singers say

    "I get to go to lots of overseas places, like Canada."
    - Britney Spears

    "I love what you've done with the place!"
    -Jessica Simpson upon meeting the Secretary of Interior during tour of the White House

  5. #5
    Banned
    Join Date
    Oct 2004
    Posts
    250
    yes main is a int function so it should return a value

  6. #6
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Is there a reason you failed to learn the answers to your questions from your last two posts:

    More qusetions...
    Switch statement problems

    And check this out before using cgod's solution:

    http://www.cprogramming.com/tips/sho...ount=30&page=0

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. More qusetions...
    By ComDriver in forum C++ Programming
    Replies: 2
    Last Post: 02-21-2005, 02:56 PM

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