Microsoft
Software
Hardware
Network
Question : C++ Programming - error 2065 Program Email Address
#include <iostream>
#include <string>
#include <vector>
using namespace std;
vector<string> addresses;
string str1 = "
[email protected]
";
string str2 = "
[email protected]
";
string str3 = "
[email protected]
";
string str4 = "
[email protected]
";
string str5 = "
[email protected]
";
string str6 = "
[email protected]
";
string str7 = "
[email protected]
m";
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(addres
s);
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
<< endl;
}
processMenu();
{
cout << "Email Address # " << i + 1 << ": " << addresses
<< 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;
}
Answer : C++ Programming - error 2065 Program Email Address
I do not know why you need h-file, but if you will make it, then you will need to add:
#include "header_file_name.h". And in this h-file you may have only function signatures:
void display();
Random Solutions
CRON JOB - using cpanel for direct_mail extension for typo3
breadcrumb trail in a dropdown box
asp.net: How to determine if a when a user login. is an Admin Account, * the menu is selected to show admin pages & reports.
Looking for XP drivers for Compaq Presario C700
Download manager Flashget V3.3 disabled IE & Firefox browsers from browsing Internet
File permissions
Arcserve error: E8535 Failed to receive data from the agent
change sched task pw via command line
Cisco ASA 5510 interface config
AJAX, JQUERY, server date timestamp