I am creating a MAC Database for my home network which shall contain a list of names of those on the network and allow me to quickly search for people when I get a warning about a user.

I am using switch statements to go to each main section (sorry, I am new to C++ and I can't remember the name for it).

The following is what I have so far, including two switch statements which I am attempting to use but unfortunately failing at:

#include <iostream>                                         
#include <fstream>                                          
#include <windows.h>
#include <string>

using namespace std;

void View_Account()                                                                  //View All Available Accounts
    cout << "View Account";
void Modify_Account()                                                                //Modify All Available Accounts
    cout << "Modify Account";

int main()
    int Option;                                                                      //User Menu Selection
    int Password = -1;                                                               //User Password

    while (Password != 1234)                                                           

        cout << "Welcome to the MAC Database Search Facility\n" << endl;            //Log In Screen
        cout << "Please enter your password now: ";

        cin >> Password;                                                            //User Input

    cout << "Welcome ****, please select your option\n" << endl;                    //Welcome Screen

    cout << "1 - View All Accounts" << endl;                                        //All Available Options
    cout << "2 - Modify an Account" << endl;
    cout << "3 - Delete an Account" << endl;
    cout << "4 - Add an Account" << endl;
    cout << "5 - Search Accounts" << endl;
    cout << "6 - Exit\n" << endl;

    cin >> Option;

    switch (Option)                                                                 //Switch Statements
        case '1':

        case '2':
    return 0;

How would I get it to go to the View_Account part when using a switch statement?

Thank you

I have found out what I did wrong, I placed the case in '
It should of been just

case 1:
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.