hello guys, i've worked with C, Java, VB and now C++ but i never knew how to deal with strings so a little bit of help will be so appreciated. it is infact a login code. here is the problem:
//displays all records
while (inStaff && !inStaff.eof() ) {
->problem if ( employee.getEmp Pass() != 0 )
{ // the excutions halts here !!!
tempVarData1 = employee.getEmp Pass();
tempVarData2 = employee.getEmp Priv();
tempVarData3 = employee.getEmp UserName();
if (( tempVarData1 == e_pass2 )&&(tempVarData 3 == e_username))
{ cout<<"you are now logged in";
showMenu (tempVarData2);
}
else
{
cout<<"sorry incorrect password";
}
somehow i got it to run once but something was wrong with assigning the string function tempVarData3 = employee.getEmp UserName(); to the string variable
//displays all records
while (inStaff && !inStaff.eof() ) {
->problem if ( employee.getEmp Pass() != 0 )
{ // the excutions halts here !!!
tempVarData1 = employee.getEmp Pass();
tempVarData2 = employee.getEmp Priv();
tempVarData3 = employee.getEmp UserName();
if (( tempVarData1 == e_pass2 )&&(tempVarData 3 == e_username))
{ cout<<"you are now logged in";
showMenu (tempVarData2);
}
else
{
cout<<"sorry incorrect password";
}
somehow i got it to run once but something was wrong with assigning the string function tempVarData3 = employee.getEmp UserName(); to the string variable
Comment