Create a teacher class
(teacher name, ID, department, subject currently handled)and
student class(student name, regno, subjects, teacher, marks(cae1,cae2,assignment), log)
such that the teacher class id made a friend of student class. Allow the teacher class to
update the student information like marks and also maintain an entry in the student class
log field everytime an updation takes place. This log should maintain the details like
teacher code, updated fields etc. please help in writing this code.

What have you got so far? Please post the code you already have, even if it doesn't work.

Do you know how to (start the) code for a C++ class?

Show us as much as you can ... (i.e. fill in your code for) :

#include <iostream>
// ...

class Teacher
{
public:
    // ...
private:
    // ...
} ;

class Student
{
    friend class Teacher;
public:
    // ...
private:
    // ...
} ;


int main()
{
    // ...
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.