I'm doing a code in which I use data structure to enter the data of three different users (name identification and salary) but when I tried the code only with one user I get the error that I put in the title What do I do?
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <fstream>
using namespace std;
struct Empleado {
string Nom;
int ced;
float sueldo;
};
string emp1;
int main (){
char op;
do{
cout<<"bienvenido."<<endl;
cout<<"Digite la opcion a la que desea acceder:"<<endl;
cout<<endl;
cout<<"1. ingresar usuarios."<<endl;
cout<<"2. Modificar usuarios."<<endl;
cout<<"3. Eliminar usuarios."<<endl;
cout<<"4. Salir."<<endl;
cin>>op;
switch(op)
{
case '1':{
cout<<"ingresar usuarios."<<endl;
Empleado emp1[3];
cout<<"ingrese nombre empleado 1:"<<endl;
cin>>emp1.Nom;
cout<<"ingrese cedula empleado 1:"<<endl;
cin>>emp1.ced;
cout<<"ingrese sueldo usuario 1:"<<endl;
cin>>emp1.sueldo;
break;
}
}
system("pause");
}while (op!='4');
}