- Strength to Increase Rep
- +2
- Strength to Decrease Rep
- -0
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
I am trying to write a function that will compute GPA. [CODE]#include "Student.h" #include "ClassInformation.h" Student* setupStudent(){ string f,l,idNo; double gPoint=0; Student *studPtr1; studPtr1 = new Student (); cout<<"Enter first name "; cin>>f; studPtr1->setfirstName(f); cout<<"Enter last name "; cin>>l; studPtr1->setlastName(l); cout<<"Enter A number"; cin>>idNo; studPtr1->setaNumber(idNo); cout<<endl; studPtr1->setGPA(gPoint); return studPtr1; } … | |
Trying to define a function that dynamically creates a Student object and then prompts the user for the info and returns pointer to a Student object. [CODE]class Student{ private: string firstName; string lastName; string aNumber; double GPA; public: Student (); Student (string f, string l, string idNo, double gPoint); string … |