[求助]如何输出结构里的类的元素
class Student
{
public:
Student()
{
setID();
}
setID()
{
int c;
cin<<c;
ID=c;
}
protected:
int ID;
}
stuct Date
{
Student student;
Date * next;
}
viod main()
{
Date *ps;
ps=new Date;
}
我想输出刚新建的ID,应该怎样输入代码啊?我找书很久也好像未提到!
大虾们有空请解答小弟的菜鸟问题,谢谢!