C++问题
请问高手,以下程序在C++BUILDER6.0下为什么不能通过编译:
#include<iostream>
#include<conio>
using namespace std;
class Student{
int id;
public:
Student(int d):id(d){cout <<"student\n";}
void print(){cout <<id <<"\n";
};
class Tutor{
Student s;
public:
Tutor(Student& st):s(st){cout <<"tutor\n";s.print();}
};
int main(){
Student ra(18);
Tutor je(ra);
getch();
}