#include <iostream>
#include <string>
using namespace std;
struct Pessoa {
int ID;
string nome;
string tel;
}; //isto provavelmente deveria ser uma classe
int main() {
Pessoa pessoa; //provavelmente deveria ser inicializado por referência e alocado dinamicamente
char opc = 'z';
do {
cout << "[1] incluir pessoa" << endl;
cout << "[2] Alterar pessoa" << endl;
cout << "[3] Excluir pessoa" << endl;
cout << "[4] Recuperar pessoa" << endl;
cout << "[0] Sair" << endl;
opc = cin.get();
switch (opc) {
case '0':
break;
case '1':
cout << "1" << endl;
break;
case '2':
cout << "2" << endl;
break;
case '3':
cout << "3" << endl;
break;
case '4':
cout << "4" << endl;
break;
default:
cout << "Opção Invalida" << endl;
}
} while (opc != '0');
}
//https://pt.stackoverflow.com/q/254999/101
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8c3RyaW5nPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKc3RydWN0IFBlc3NvYSB7CiAgICBpbnQgSUQ7CiAgICBzdHJpbmcgbm9tZTsKICAgIHN0cmluZyB0ZWw7Cn07IC8vaXN0byBwcm92YXZlbG1lbnRlIGRldmVyaWEgc2VyIHVtYSBjbGFzc2UKCmludCBtYWluKCkgewogICAgUGVzc29hIHBlc3NvYTsgLy9wcm92YXZlbG1lbnRlIGRldmVyaWEgc2VyIGluaWNpYWxpemFkbyBwb3IgcmVmZXLDqm5jaWEgZSBhbG9jYWRvIGRpbmFtaWNhbWVudGUKICAgIGNoYXIgb3BjID0gJ3onOwogICAgZG8gewoJICAgIGNvdXQgPDwgIlsxXSBpbmNsdWlyIHBlc3NvYSIgPDwgZW5kbDsKCSAgICBjb3V0IDw8ICJbMl0gQWx0ZXJhciBwZXNzb2EiIDw8IGVuZGw7CgkgICAgY291dCA8PCAiWzNdIEV4Y2x1aXIgcGVzc29hIiA8PCBlbmRsOwoJICAgIGNvdXQgPDwgIls0XSBSZWN1cGVyYXIgcGVzc29hIiA8PCBlbmRsOwoJICAgIGNvdXQgPDwgIlswXSBTYWlyIiA8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