[HELP]C++ - Functions
Go to solution
Solved by as96,
void find(studentType p[], int highest, int lowest, int d, int e)void print(studentType p[], int highest, int lowest, int d, int e) find(p, highest, lowest, d ,e); print(p, highest, lowest, d ,e);
You are not passing those variables by reference, they are just copies, when you print them you just print un-initialized variables, only arrays get passed automatically via reference for every other type you need to use &
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now