0
Help me improve this function of that is part of a program am writing.
I wanted the function to prevent entry of the same contact for different people and give the option of entering the contact again. It should iterate till a different contact is put so that the other functions are executed. Use C++ . https://code.sololearn.com/cpkGj8shzSg6/?ref=app
1 Odpowiedź
0
First you need to call cin to get input.
**check if(a==a) is always going to return true.
Instead,
long int x;
cin>>x;
//iterate code here
if(x==contact){
//warning and prompt again
}
To clean the code, create a Contact class.
Happy Coding,hope it helped somehow