M
muser
switch( temp1[0] )
{
case 'c':
case 'C':
Processcrecord( temp1, prnfile, validdata );
break;
case 'i':
case 'I':
case 'r':
case 'R':
ProcessIRecord( temp1, prnfile, validdata );
break;
case 'd':
case 'D':
processdrecord( temp1, prnfile, validdata );
break;
default: prnfile<< "Unknown record\n";
prnfile<< temp1 << endl;
};
if(Processcrecord( temp1, prnfile, validdata )){ true; }{
validdata << temp1 << endl;// suppose to check that the function evaluates true
break;// and then writes it to the validdata file.
}
if(ProcessIRecord( temp1, prnfile, validdata )){ true; }{
validdata << temp1 << endl;
break;
}
if(processdrecord( temp1, prnfile, validdata )){ true; }{
validdata << temp1 << endl;
break;
}
does //if(Processcrecord( temp1 etc ) actually perform the task its suppose to?
Is the code correct or does the if statement always return true regardless?
{
case 'c':
case 'C':
Processcrecord( temp1, prnfile, validdata );
break;
case 'i':
case 'I':
case 'r':
case 'R':
ProcessIRecord( temp1, prnfile, validdata );
break;
case 'd':
case 'D':
processdrecord( temp1, prnfile, validdata );
break;
default: prnfile<< "Unknown record\n";
prnfile<< temp1 << endl;
};
if(Processcrecord( temp1, prnfile, validdata )){ true; }{
validdata << temp1 << endl;// suppose to check that the function evaluates true
break;// and then writes it to the validdata file.
}
if(ProcessIRecord( temp1, prnfile, validdata )){ true; }{
validdata << temp1 << endl;
break;
}
if(processdrecord( temp1, prnfile, validdata )){ true; }{
validdata << temp1 << endl;
break;
}
does //if(Processcrecord( temp1 etc ) actually perform the task its suppose to?
Is the code correct or does the if statement always return true regardless?