資源簡(jiǎn)介
我是2017級(jí)的,老師是李宏芒老師,希娃對(duì)學(xué)弟學(xué)妹們的學(xué)習(xí)有所幫助!
代碼片段和文件信息
#include?
#include?
#include?
#include?
using?namespace?std;?
class?Table?
{?
private:?
string?str[40];?
int?strcount;?
string?name;?
public:?
Table();?
~Table();?
void?setname(string?strTemp);?
string?getname();?
void?update(string?strTemp);?
void?init(string?filename);?
int?search(string?strTemp);?};?
Table::Table()?
{?
for?(int?i?=?0;?i<40;?i++)?
str[i]?=?““;?
strcount?=?0;?
name?=?““;?
}?
Table::~Table()?
{?
}?
void?Table::setname(string?strTemp)?{?
name?=?strTemp;?
}?
string?Table::getname()?
{?
return?name;?
}?
void?Table::update(string?strTemp)?{?
str[++strcount]?=?strTemp;?}?
void?Table::init(string?filename)?{?
string?strin;?
ifstream?infiles(filename);?
if?(!infiles)?
cout?<“打開(kāi)“<
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????5462??2019-05-23?22:48??lexicalAnalyzer.cpp
?????文件???????8946??2019-06-15?09:18??LL(1).cpp
?????文件??????11156??2018-06-20?22:31??LR(1).cpp
?????文件?????142254??2019-06-28?00:14??實(shí)驗(yàn)報(bào)告.docx
-----------?---------??----------?-----??----
???????????????167818????????????????????4
評(píng)論
共有 條評(píng)論