i need to write a function that reads in an operator (+,-,*,/) and returns a boolean. true if the operator is valid and false if it is not. the function will have two parameters. one is a string containing the valid operators (+,-,*,/), the second is a reference parameter where the operator will be placed if the operator entered is valid.
how can i do this? i just can't figure out how to write the code.
C++ question?
u need to use pointer and function using call by reference
passing those pointers
in function u wud just check the validity
ur funtion may look like
void checker(bool *validity, char * string_operator);
baby breath
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment