码农又在讨论种地用什么农具
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
#include <iostream>#include <cstdio>using namespace std;class Farmer {private: const string github, email, weibo, wechat, QQ, home; volatile string job; public: Farmer(const string & s1, const string & s2, const string & s3, const string & s4, const string & s5, const string & s6, const string & s7 ); void sleep(void);};Farmer::Farmer(const string & s1, const string & s2, const string & s3, const string & s4, const string & s5, const string & s6, const string & s7 ):github(s1),email(s2),weibo(s3),wechat(s4),QQ(s5),home(s6),job(s7) { cout << "Hello Visitor!" << endl;}void Farmer::sleep(void) { for(;;) { char trash[4096]; fgets(trash,sizeof trash, stdin); cout << "What's Up?" << endl; }}int main(int argc,const char **argv) { Farmer * const lycon = new Farmer ( "https://github.com/helloLycon", "lycon123@foxmail.com", "https://weibo.com/lycon361", "lk361115629", "361115629", "Wenzhou", "embedded-linux" ); lycon->sleep(); return 0;}