# include<iostream>
# include<conio.h>
# include<string.h>
using namespace std;
class Teacher;
class Student{
friend class Teacher;
int age;
public:
Student() { age=20;};
void print()
{ cout<<"Student's age:"<<age<<endl; }
};
class Teacher{
char name[25];
public:
Teacher(char *name1) {strcpy(name,name1);};
void print()
{ cout<<"Teacher's name:"<<name<<endl; }
void T_ddd(Student &student){student.age=23;};
};
int main()
{;
Student st; st.print();
Teacher tch("D.Undrah");
tch.print();
getch();
tch.T_ddd(st);
st.print();
getch();
};-- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-code/7e671366-a25a-449a-8a33-156415c60005%40googlegroups.com.
