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
Backup Exec 2010 can not view DAG, Exchange 2010
SCCM 2007 collection by OU not showing all pc's
Email account got spoofed?
C++ dll in VB
Training Path
Fast download/upload, slow surfing
do you need sysprep with Symantec Ghost Solution Suite 2.5?
Use different HTTP Redirects on multiple virtual directories in IIS 7.5
Imail Mail Server blocked. Cant see why
Dataform Combo