写一程序,输出显示,你在论坛上的个人信息。注意代码风格和习惯。编译成eXe 后,用
OD 反汇编,注释出你写的函数的每一条语句的意思。
1
#include <stdio.h>
2
#include <iostream.h>
3
#include <iomanip.h>
4
5
int Out_Message()
6

{
7
int nRetCode = 0;
8
cout<<"论坛信息 "<<endl;
9
cout<<"用户名 "<<setw(20)<<"Sleven"<<endl;
10
cout<<"用户ID "<<setw(20)<<"2045 "<<endl;
11
cout<<"昵称 "<<endl;
12
cout<<"自定义头衔"<<endl;
13
cout<<"用户组 "<<setw(20)<<"VIP "<<endl;
14
cout<<"阅读权限 "<<setw(20)<<"200 "<<endl;
15
cout<<"积分 "<<setw(20)<<"609 "<<endl;
16
cout<<"威望 "<<setw(20)<<"403 "<<endl;
17
cout<<"金钱 "<<setw(20)<<"508 "<<endl;
18
cout<<"牛粪 "<<setw(20)<<"0 "<<endl;
19
cout<<"发帖量 "<<setw(20)<<"83 "<<endl;
20
cout<<"精华贴数 "<<setw(20)<<"0 "<<endl;
21
cout<<"在线时间 "<<setw(20)<<"1160分"<<endl;
22
return nRetCode;
23
}
24
25
void main()
26

{
27
//输出数据
28
Out_Message();
29
}
#include <stdio.h>2
#include <iostream.h>3
#include <iomanip.h>4

5
int Out_Message()6


{7
int nRetCode = 0;8
cout<<"论坛信息 "<<endl;9
cout<<"用户名 "<<setw(20)<<"Sleven"<<endl;10
cout<<"用户ID "<<setw(20)<<"2045 "<<endl;11
cout<<"昵称 "<<endl;12
cout<<"自定义头衔"<<endl;13
cout<<"用户组 "<<setw(20)<<"VIP "<<endl;14
cout<<"阅读权限 "<<setw(20)<<"200 "<<endl;15
cout<<"积分 "<<setw(20)<<"609 "<<endl;16
cout<<"威望 "<<setw(20)<<"403 "<<endl;17
cout<<"金钱 "<<setw(20)<<"508 "<<endl;18
cout<<"牛粪 "<<setw(20)<<"0 "<<endl;19
cout<<"发帖量 "<<setw(20)<<"83 "<<endl;20
cout<<"精华贴数 "<<setw(20)<<"0 "<<endl;21
cout<<"在线时间 "<<setw(20)<<"1160分"<<endl;22
return nRetCode;23
}24

25
void main()26


{27
//输出数据28
Out_Message();29
}
//注释 注意TAB键在setw中的不同之处 开始写代码的时候觉得对齐了 可是总不对其 都是TAB惹的祸



所有评论(0)