i seem to have an error in my do while loop and i cannnot see where i have gone wrong. Any help would be very much appreciated. Here is the part of my code affected,
,Code:do { db.insertionSort(); // insertion-sort them cout << "\nSelect an option:\n\n"; // menu display options cout << " 1 Add a new CD.\n"; cout << " 2 Display all CDs.\n"; cout << " 3 Search CDs by Artist.\n"; cout << " 4 Delete CD.\n"; cout << " 5 To Quit Program.\n"; cin >> menuValue; if( menuValue == 1 ) // the actual menu cout << "\nEnter Artist:\n"; cin >> artist; cout << "Enter Title:\n"; cin >> title; cout << "Enter Genre:\n"; cin >> genre; cout << "Enter Year:\n"; cin >> year; db.insert (artist, title, genre, year ); } else if ( menuValue == 2 ){ cout << "List of CD's in Library: \n\n" << endl; db.display(); // display all records } else if (menuValue == 3){ cout <<"Enter Artist search: "; db.searchArtist(); //display selected artist } else if(menuValue == 4 ){ db.deleteCompactDisc(); // delete selected person cout << "\nCD's in Library after deletion:\n\n" << endl; db.display(); // display them again } else { menuValue == 5; exit(1); } }while(menuValue !=1 && menuValue !=2 && menuValue != 3 && menuValue !=4 && menuValue != 5){ cout << "Select a number from 1 to 5"; cin.clear(); cin.ignore(256, '\n'); } return 0; }