#include
#include
#include
using namespace std;
class Lesson //为节点类,链表方法
{
public:
string name_of_lesson;
string book;
string time;
string place;
string score;
Lesson *next_lesson;
Lesson(ifstream& infile);
};
Lesson::Lesson(ifstream& infile):next_lesson(NULL)
{
infile>>name_of_lesson;
cout< infile>>book;
cout< infile>>time;
cout< infile>>place;
cout< infile>>score;
cout<<score<<endl;
}
int main()
{
string e="record.txt";
int b;
ifstream infile(e.c_str(),ios::in);
infile>>b;
Lesson * z =new Lesson(infile);
cout<<"1212"<<endl;
}
到了Lesson构造函数中就跳不出来了
求大神指教诶
http://bbs.csdn.net/topics/390797798
http://www.oschina.net/question/1772794_156948?sort=time
http://jingyan.baidu.com/article/b24f6c822756b886bfe5da90.html
谢谢,应该只是ide的问题