Hello, I am making a movie list which need to use pPreviousNode and pNextNode. (Linked list of nodes)
When I click option 1, it would give me
'The movie queue is empty! Please add movies to the queue' which I made that.
When I click option 2, it would give me information about 'wizard of Oz'.
Then here is the problem.
If I click option2 again, movie list wizard of oz will come out again.
I want to give out different movie list, not same movie about Oz. like ironman or x-men which I am going to add later. I want to use node function to do this.
Here is my code so far. It's not done but i'm getting to understand it.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
#include <iostream>
#include <iomanip>
using namespace std;
int main(int argc, char* argv[])
{
cout << setw(29) << left << "Welcome to the Netflix Movie Menu!" << endl;
int option; //Entering option will save in variable
do //This function will repeatedly display until user select exit option
{
//Displaying Options for the menu
cout << "1. Display Movie Queue" << endl;
cout << "2. Add Movie to Queue" << endl;
cout << "3. Edit Movie in Queue" << endl;
cout << "4. Remove Movie from Queue" << endl;
cout << "5. Search for Movie in Queue" << endl;
cout << "6. Remove Movie from Queue" << endl;
//Prompting the user to enter option according to menus
cout << "Please Enter option : ";
cin >> option; // This data value will take as input with menu
if(option == 1) // Checking if option 1 is selected
{
//Displays empty Queue
cout << "The movie queue is empty! Please add movies to the queue." << endl;
}
else if(option == 2) //Checking if option 2 is selected
{
//Displaying the movie 'The Wizard of Oz'
cout << "Enter Movie Name: The Wizard of Oz" << endl;
cout << "Enter Year: 1939" << endl;
cout << "Rating: PG" << endl;
cout << "Ranking (1-5): 4" << endl;
cout << "Movie added to the Queue!" << endl;
}
|