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
IE8 or Higher
Serialization in MFC
Access Report - Where Condition
setting SMTP server - please see attached file - it is not working
characters per inch and font points
Backbone switch best practice
How to parse XML string in Oracle procedure ?
Exchange 2007 ccr failover did not function correctly last night
How can I tied up a JQuery event after a Postback?
Web server in DMZ to access SQL server on INSIDE