(100 分Symbian)求大家帮助我加上注释!!!!!!!!!!!!!!!

来源:百度知道 编辑:UC知道 时间:2024/05/08 16:22:05
#include "T4_2.h"
#include <e32base.h>
#include <e32std.h>
#include <e32cons.h> // Console
// Constants

_LIT(KTextConsoleTitle, "Console");
_LIT(KTextFailed, " failed, leave code = %d");
_LIT(KTextPressAnyKey, " [press any key]\n");
_LIT(KRETURN,"\n");
_LIT(KFORMAT2,"the id is %d");
_LIT(KFORMAT3,"the iScore is %d");
_LIT(KSTUDENT1,"zhangbing");
_LIT(KSTUDENT2,"dingna");
_LIT(KSTUDENT3,"wangfang");
_LIT(KKK,"the value is %d");

class TStudent
{
public:
TStudent(const TDes &aSName,TUint aSNo,TInt aScore);
public:
TUint iId;
TBuf<10> iName;
TInt iScore;
};
TStudent::TStudent(const TDes &aSName,TUint aSNo,TInt aScore)
{
iId=aSNo;
iName=aSName;
iScore=aScore;
}

前4行是头文件。
_LIT(。。。); 这些行是常量定义。_LIT(); 应当是宏定义,头文件应有具体定义。顾名思义,这几行。_LIT()等于 :
char KTextConsoleTitle[]="Console"; //显示窗左上角显示的字符
char KTextFailed[]=" failed, leave code = %d"; //文字错,出错码
char KSTUDENT1[]="zhangbing"; // 学生1,名叫张兵
char KSTUDENT2[]="dingna"; // 学生2,名叫丁娜
char KSTUDENT3[]="wangfang"; // 学生3,名叫王芳

class TStudent // TStudent class 声明
{
public:
TStudent(const TDes &aSName,TUint aSNo,TInt aScore); // 构建函数原型声明
public: // public
TUint iId; // 学生 ID, 无符号整数 (TUint 要看头文件才知)
TBuf<10> iName; // 学生名,(TBuf,估计是char) 长度10,
TInt iScore; // 成绩。整数
};

// TStudent类的 构建函数定义:
TStudent::TStudent(const TDes &aSName,TUint aSNo,TInt aScore)
{
iId=aSNo; // 学生id
iName=aSName; // 学生名字
iScore=aScore; // 学生分数
}

----
简单的程序弄得那么繁琐!

你应该上塞班网找,这里没多少人可以解决得了…