How can I pass a structure pointer to a function properly? : c++ beginner here. So I have several functions in which I am trying to pass an element of array of pointers (which contains structures (records)). I'm having trouble doing this and I'm pretty stuck and frustrated. I'm very new to pointers and memory so go easy on me. I keep getting errors when I try to pass the specific structure element into the function. (BTW: The functions are declared in a header file)

What can I do to fix/change this and make it work? Thank you for the help, it is very much appreciated. 



The error I get: 

    'changeAssignmentGradeForStudent' was not declared in this scope



**Code:**

Structure student:

    typedef struct {

	    char firstName[50];
	    char lastName[50];
	    char studentNumber[10];
	    char NSID[10];
	    float assignments[10];
	    float midterm;
	    float final;

    }Student;


    void useFunctions(int recordNum) {

	    // array of 10 student references
	    Student* students[recordNum];

	    // values received from the user
	    for (int i = 0; i < recordNum; i++) {

		    cout << "Student " << i+1 << ": " << endl;
		    students[i] = readStudentRecordFromConsole();
	    }

    cout << "Would you like to make any changes to any student records? (N or Y)" << endl;

	cin >> answer;

			if (answer == 'N') {


				return;

				} else {

					cout << "Which student?" << endl;
					cin >> student;


					students[student-1] = gradeChanges(*students[student-1], recordNum, student);



    }

    Student * gradeChanges(Student* s, int recordNum, int student) {

	    Student *changedStudent = s;
	    int gradeChange, aNum;

	       cout << "assignment number to change?" << endl;
           cin >> aNum;
           cout << "assignment to change?" << endl;
           cin >> gradeChange;

	   changeAssignmentGradeForStudent(changedStudent, aNum, gradeChange); //  where the errors are


	   return changedStudent;
	}


    void changeAssignmentGradeForStudent(Student* s, int a, int g)	{

	    if (s != NULL) {

		    s->assignments[a] += g;

	    }

    }


PS: Sorry if my code is not formatted correctly. If it isn't, please edit it for me, thank you. 