Thread: loop

  1. #16
    Registered User
    Join Date
    May 2017
    Posts
    8
    ok i'm going to post the code then

    Code:
    int ChooseFromMenu()
    {
        while ((DisplayMenu() && !(cin >> A ) || (cin.good() && (A < 1 || A > 9))) {
        cout << "\nInvalid input!\n"<<endl;
        cin.clear();
        cin.ignore(1000, '\n');
     
    }
    } //getting error on this brace

    getting error on A undeclared if I declare it before while , I get error on DisplayMenu which is void . and Cant remove chooseFromMenu also because its the function any idea how can we fix it?? thx
    Last edited by david16; 05-16-2017 at 04:02 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 09-22-2016, 09:08 AM
  2. Replies: 1
    Last Post: 03-28-2015, 08:59 PM
  3. Help - Collect data from Switch loop inside While loop
    By James King in forum C Programming
    Replies: 15
    Last Post: 12-02-2012, 10:17 AM
  4. Replies: 23
    Last Post: 04-05-2011, 03:40 PM
  5. for loop ignoring scanf inside loop
    By xIcyx in forum C Programming
    Replies: 2
    Last Post: 04-17-2007, 01:46 AM

Tags for this Thread