#include <iostream>
#include <cstdlib>
#include <cstring>
using namespace std;
/*
*
*/
#define NAME 5
#define EMAIL 2
int main() {
char* address[NAME][EMAIL] = {{"Barrack", "president@whitehouse.gov"},
{"Roger", "rpowell@valleycollege.edu"},
{"Mark", "markz@facebook.com"},
{"Bill", "billg@microsoft.com"},
{"Gaga", "admin@lady-gaga.net"}};
for(int i = 0; i < NAME; i++) {
for(int j = 0; j < EMAIL; j++) {
cout << address [i][j] << endl;
}
}
return 0;
}
I don't seem to have a clue of how to search for the name and in return get the email for that name. I managed to figure out how to print out the array. Your help is much appreciated. Thank you.