資源簡介
一款小巧的網上商城系統,主要以C++語言實現編碼。供初學者學習與參考!
代碼片段和文件信息
#include?
#include?
#include?“CGoodList.h“
CGoodList::CGoodList()
{
memset(this?0?sizeof(CGoodList));
}
bool?CGoodList::_isExist(int?Index)
{
if?(Index?0?||?Index?>=?MAXGOODNUM)
return?false;
return?goods[Index]?!=?NULL;
}
int?CGoodList::_getIndex(int?id)
{
for?(int?i?=?0;?i? if?(_isExist(i)?&&?((CGood?*)goods[i])->getId()?==?id)
return?i;
return?-1;
}
int?CGoodList::_getIndex(char?*name)
{
for?(int?i?=?0;?i? if?(_isExist(i)?&&?!strcmp(((CGood?*)goods[i])->getName()?name))
return?i;
return?-1;
}
int?CGoodList::_getType(int?Index)
{
if?(!_isExist(Index))
return?-1;
return?((CGood?*)goods[Index])->getType();
}
CGood?*CGoodList::_getGood(int?Index)
{
if?(!_isE
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-07-16?14:53??網上商城C++\
?????文件????????3582??2005-05-03?16:39??網上商城C++\CGoodList.cpp
?????文件????????1065??2005-05-03?16:39??網上商城C++\CGoodList.h
?????文件????????1572??2005-05-03?16:39??網上商城C++\CGuest.cpp
?????文件?????????546??2005-05-03?16:39??網上商城C++\CGuest.h
?????文件????????6865??2005-05-03?16:39??網上商城C++\COnlineStore.cpp
?????文件?????????598??2005-05-03?16:39??網上商城C++\COnlineStore.h
?????文件????????1583??2005-05-03?16:39??網上商城C++\CUser.cpp
?????文件?????????830??2005-05-03?16:39??網上商城C++\CUser.h
?????文件????????3545??2005-05-03?16:39??網上商城C++\CUserList.cpp
?????文件????????1056??2005-05-03?16:39??網上商城C++\CUserList.h
?????文件?????????556??2005-05-03?16:39??網上商城C++\Data.dat
?????文件???????42755??2005-05-03?16:39??網上商城C++\FileMap.png
?????文件???????22925??2005-05-03?16:39??網上商城C++\Interface.cpp
?????文件?????????809??2005-05-03?16:39??網上商城C++\Interface.h
?????文件?????????133??2005-05-03?16:39??網上商城C++\main.cpp
?????文件???????29752??2005-05-03?16:39??網上商城C++\MainForm.png
評論
共有 條評論