-1
Create a map
which has three keys ("Local
", "Resp
", "Prioridade
"). Ask the user to fill in this map
and then show the result on the screen.
#include <iostream>
#include <map>
using namespace std;
int main(){
map<string,map<string,string>> alfa;
string local;
string prioridade;
string responsavel;
cout<<"Digite o local: ";
cin>>local;
cout<<"Digite a prioridade: ";
cin>>alfa[local][prioridade];
cout<<"Digite o responsável: ";
cin>>alfa[local][responsavel];
for(auto elem : alfa){
cout << elem.first << " " << elem.second[prioridade]<< " " << elem.second[responsavel]<<endl;
}
}
What is your question ?
– Isac