im new here im wonder if anyone canth help mevoid find(){
Code:
void find()
{
cout<<"Enter id number"<<endl;
cin>>id;
for(i=0;i<2;i++)
{
if(id==employees[i]->getID())
{
cout<<"Salary is $";
cout<<employees[i]->getSalary<<endl;
}
}//end of for
}//end of function
the code above is a find function that is suppose to return the employees salary from the array but if some one enters a id that doesnot exist the function is to return -1 cant any one tellm e to that thanks in advance
