well ,,
here is a function i search for the Max GPA in a tree , where :
Code:struct treenode { int st_id; float gpa; ptrtotree left; ptrtotree right; }; void MaxGPA(ptrtotree t,float max) //here : float &max ?!!! { if(t!=NULL) { if(t->gpa > max) { max=t->gpa; } MaxGPA(t->left,max); MaxGPA(t->right,max); } } // i am wondering how can i define the float max , or float *max , void main { float max;
need help ASAP
thanks in advance