/var/tmp/ccKyPeru.o: In function `main':
main.cpp:(.text.startup+0x17b): undefined reference to `newCGPA()'
main.cpp:(.text.startup+0x1a6): undefined reference to `currentCGPA()'
main.cpp:(.text.startup+0x1cb): undefined reference to `previousCGPA()'
collect2: error: ld returned 1 exit status
can someone help me fix this coding?
i need to create cgpa calculate application. the application may able to calculate previous cgpa and current cgpa. and the program must include funtion, selection, looping, array, struct/pointer.
cout<<"\nTotal All Point: "<<totalP;
cout<<"\nTotal All Credit: "<<totalC;
cout<<"\n";
cout<<"\nNew CGPA (Total All Point / Total All Credit) = "<<totalP/totalC<<endl;
cout<<"\n";
cout<<"Calculate for another student (Y/N): ";
cin>>another;
}
case 5:
cout<<"5.Calculate New CGPA"<<endl;
newCGPA();break;
On the third line there, you're trying to call the function newCGPA(). That function does not exist. You cannot call functions that don't exist.
Looks like you do have this function: void newCGPA(float total_Cur_P,float total_Cur_C,float total_Pre_C, float total_Pre_P)
but that's not the same as newCGPA()