Thread: help???

  1. #16
    Registered User
    Join Date
    Aug 2004
    Location
    San Diego, CA
    Posts
    313
    Quote Originally Posted by jlou
    Ummm, that won't work, flag is local to main, and won't get updated even if it compiled (it wouldn't because flag is unidentified in menu()). Maybe something more like:
    *blink*

    Please forgive. I have a strong head-cold and ... wow. Yeah. Or you could pass flag in the function defination (int menu(bool flag)). I think. Or just use a global variable (ick).

    Your way works though.

  2. #17
    Registered User
    Join Date
    Sep 2004
    Posts
    29

    Unhappy

    Code:
    do {
    
    	std::cout << "Show this again? ( -1 for no ): ";
    	std::cin  >> flag;
    
    } while ( flag != -1 );
    is there anyway to access the data inside the flag??

    if I'm suppose to use an array for my second assignment i'm hosed
    huh???

  3. #18
    Registered User
    Join Date
    Sep 2004
    Posts
    29
    im guess i try to start over somewhat
    im trying to use user data until the user inputs -1

    if the user inputed say 4 5 -1

    my output would look something like

    a counter the number of integers used ie 2
    the sum ie 9
    the largest number ie 5
    the smallest number ie 4
    the product ie 20
    the avg ie 4.5

    -1 should not be used to calculate any of the data below

    i could use some help
    teach myself c++ in 24 hours isnt seeming to help

  4. #19
    eat my shorts!
    Join Date
    Apr 2002
    Posts
    294
    i could use some help
    teach myself c++ in 24 hours isnt seeming to help
    lol.
    Games Reviews Previews Desktop Themes Downloads Paintball Forums Shareware Freeware and much more

    The best in Technology and Gaming News

    www.back2games.com

Popular pages Recent additions subscribe to a feed