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
xp sp2 clients wont log or ping server 2003
ZFS Fuse help Ubuntu 10.0.4 LTS
accessing VPN while Internet Tethering on iPhone
fiddling nose habit
XSLT Wildcards and custom processing.
Alternative to a cursor
Terminal Server client side CD/DVD writing
Better Search - Full-Text Indexing?
java get utc date/time
Office 2007 Excel cells appear blank