C++观影网站管理系统
摘要:#include<iostream>#include<fstream>#include<cstdlib>usingnamespacestd;//第一部分:用户类classuser{public:user(){}user(stringname):name(name){}user(stringname,inthobby,stringemail);level,intage,stringoccupation,stringstringgetusername(){returnname;}voidwriteuser();friendistream&operator>>(istream&in,user&u);private:stringname;intlevel;intage;stringoccupation;stringhobby;stringemail;};user::user(stringname,intlevel,intage,stringoccupation,stringhobby,stringemail):name(name),age(age),occupation(occupation),hobby(hobby),email(email){ofstreamoutfile;outfile.open("userfile.txt",ios::app);outfile<<name<<""<<level<<""<<occupation<<""<<hobby<<""<<email<<endl;"<<age<<"outfile.close();}voiduser::w
温馨提示:当前文档最多只能预览
8 页,若文档总页数超出了
8 页,请下载原文档以浏览全部内容。
本文档由 匿名用户 于 2020-02-26 09:35:38上传分享