#include<iostream>
using namespace std;
class Email
{
int age;
long int phno;
char name,dob;
public:
char emailid;
void get_details()
{
cout<<"Enter your name:- "<<endl;
cin>>name;
cout<<"Enter your age:- "<<endl;
cin>>age;
cout<<"Enter your phone number:- "<<endl;
cin>>phno;
cout<<"Enter your Date Of Birth:- "<<endl;
cin>>dob;
cout<<"Enter your Email Id:- "<<endl;
cin>>emailid;
}
};
int main()
{
Email *obj=new Email;
int n,i,j;
cout<<"Enter the number of Users:- "<<endl;
cin>>n;
obj[0].get_details();
for(i=1;i<n;i++)
{
for(j=0;j<i;j++)
{
obj[i].get_details();
if((obj[i].emailid)==(obj[j].emailid))
{
cout<<"An Email Already exists with that Email Id Please Try Again"<<endl;
delete[] obj;
}
}
}
return 0;
}