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
SQL 2005 Select Query from multiple tables
How to change HEX value to EBCDIC char
are there any inherent issues introducing a server 2008 system into a predominantly 2003 network?
PHP 5.3.2 installation problem on Vista IIS7
adding a mac to sbs 2003 network
How to configure Remote SPAN or alternative option on HP Procurve 2626-PWR switch ?
How can I handle dbNull in Linq?
How to Installing SQL-DMO on sql 2008
SSIS Package Hangs in SQL Job
Return a value if date field is equal to the present date.