Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

C++ Programming - error 2065 Program Email Address

Avatar of determinewoman
determinewoman asked on
Visual C++.NETEditors IDEs
4 Comments1 Solution444 ViewsLast Modified:
#include <iostream>
#include <string>
#include <vector>
using namespace std;
 
vector<string> addresses;
 
string str1 = "joviking@gmail.com";
string str2 = "kim1994@yahoo.com";
string str3 = "success10@verizon.net";
string str4 = "jmllove@gmail.com";
string str5 = "billsmith@yahoo.com";
string str6 = "baller4life@verizon.net";
string str7 = "focusmoreontrips@gmail.com";

bool processMenu() {
 cout << endl <<"What would you like to do?" << endl;
 cout << "1. Enter an email address. " << endl;
 cout << "2. Search for an email address. " << endl;
 cout << "3. List all email addresses. " << endl;
 cout << "4. Delete an email address. " << endl;
 cout << "5. Exit program. " << endl;
      
 char choice;
 cin >> choice;
      
 if(choice == '1'){
  cout << "You chose option #1." << endl;
cout << "Please enter the address: ";
string address;
cin>> address;
addresses.push_back(address);
processMenu();
                      
 }else if(choice == '2')
{
                      
 cout << "You chose option #2." << endl; //Search email addresses
   processMenu();
                      

            cout << "You chose option #3." << endl;
            cout << "Listing addresses. " << endl;
            for(int i = 0; i << addresses.size(); i++)
            {
              cout << "Email Address # " << i + 1 << ": " << addresses[i] << endl;
            }
            processMenu();

            
                  {
                    cout << "Email Address # " << i + 1 << ": " << addresses[i] << endl;
                      processMenu();
                  }
             }else if(choice == '4'){
                       cout << "You chose option #4." << endl;
                       //
                       processMenu();
           }else if(choice == '5'){
                     cout << "You chose option #5." << endl;
                     cout << "Exiting the program." << endl;
             
                     return 1;
                     
             }else{
                     return false;
           }
             return true;
      }
      
      int main()
      {
          char answer;
      
          cout << "Email storage program." << endl << endl;
      
          while (!processMenu()) {
                cout << "Sorry, that was an invalid choice." << endl;
                cout << "Please try again." << endl << endl;
          }
          cout << endl << "Thank you for using the program." << endl;
      
          system("pause");
          return 0;
      }

ASKER CERTIFIED SOLUTION
Avatar of pgnatyuk
pgnatyukFlag of Israel image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answers