資源簡介
C++實戰源碼-使用結構體標識操作員名稱(入門級實例088).zip
代碼片段和文件信息
//?Operator.cpp?:?Defines?the?entry?point?for?the?console?application.
//
#include?“stdafx.h“
#include?“iostream.h“
//操作員
struct?Operator
{
char?Name[10];//名稱
char?PassWord[10];//密碼
int?Level;//級別
};
int?main(int?argc?char*?argv[])
{
Operator?Ops[3];
for?(int?i?=?0;i<3;i++)
{
cout?<“請輸入第“?< cin?>>?Ops[i].Name;
cout?<“請輸入第“?< cin?>>?Ops[i].PassWord;
cout?<“請輸入第“?< cin?>>?Ops[i].Level;
}
for?(i?=?0;i<3;i++)
{
cout?<“第“?< cout?<“第“?< cout?<“第“?< cout?< }
return?0;
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????733??2010-09-28?09:48??Operator\Operator.cpp
?????文件????????4560??2010-09-27?14:29??Operator\Operator.dsp
?????文件?????????541??2010-09-27?14:29??Operator\Operator.dsw
?????文件?????????295??2010-09-27?14:29??Operator\StdAfx.cpp
?????文件?????????769??2010-09-27?14:29??Operator\StdAfx.h
- 上一篇:C++實戰源碼-桃園三結義
- 下一篇:C++實戰源碼-判斷閏年
評論
共有 條評論