Question: Can anyone help me solve this error im getting? I have pasted my code below Student.cpp #include Student.h #include string #include using namespace std; Student::Student(string

Can anyone help me solve this error im getting? I have pastedCan anyone help me solve this error im getting? I have pasted my code below

Student.cpp

#include "Student.h" #include "string" #include using namespace std;

Student::Student(string id){ studentId = id; }

void Student::addAddress(string sn, int hn, string an, string ct, string st, string cou){

address = Address(sn, hn, an, ct, st, cou);

}

void Student::display() { cout Main.cpp

#include "Student.h" #include using namespace std;

int main(){

Student rishi("rsaripa"); rishi.email = "rishi.saripalle@ilstu.edu"; rishi.name = "Rishi Saripalle"; rishi.grade = "9";

rishi.addAddress("Street Name",123,"Apartment Name","City","State","Country"); rishi.display();

return 0;

}

Student.h

#include using namespace std; class Student{ private: string studentId; Address *address;

public: string email; string name; string grade;

Student(string id);

void addAddress(string sn, int hn, string an, string ct,string st, string cou); void display();

};

Main.cpp: In function 'int main()': Main.cpp:7:3: error: 'Student' was not declared in this scope Student rishi("rsaripa"); A Main.cpp: 8:3: error: 'rishi' was not declared in this scope rishi.email = "rishi.saripalle@ilstu.edu

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!