Hey guys, first time posting so i hope im not completely retarded with my code. Basically what im trying to do is get the scores of category, then pass them to the calc_calc function for processing. everything works fine until the values need to be passed. I was wondering if im completely wrong here or if its a quick fix. Thanks alot for your help!
well im not getting any output for the function calc_calc....or did i miss something, i thought that after the calc_calc function ran it would return the grade to me.
You need to pass the values by reference to the function.
If you need the changed values of mid, final, etc to be passed back to the main function, then you need to pass them by reference. Nothing in the OP's code suggests that that's the case, though.
As others have said, the problem is that the code isn't actually doing anything with the returned value. calc_calc is returning the value, but the main function is ignoring it.