concentrate on c/c++ related technology

plan,refactor,daily-build, self-discipline,

  C++博客 :: 首页 :: 联系 :: 聚合  :: 管理
  37 Posts :: 1 Stories :: 12 Comments :: 0 Trackbacks

常用链接

留言簿(9)

我参与的团队

搜索

  •  

最新评论

阅读排行榜

评论排行榜

struct A
{
 int a;// 装备
 int b;// 角色数据
 char c;
};
void main( void )
{
 //printf("hello world!");
 char buffer[] = "This is a test of the memset function";

 A aStruct;
 // 发现数据相同。
 memset(&aStruct,'*',sizeof(aStruct));
 printf( "Before: %s\n", buffer );
 memset( buffer, '*', 4 );
 printf( "After:  %s\n", buffer );
 if (buffer[2] == '*')
 {
  printf("hello,world\n");
 }
 // 判断这个是否要保存。
 if (aStruct.a == 0x2a2a2a2a)
 {
  // 发送给DBSERVER.
  printf("hello char\n");
 }
 if (aStruct.c == 0x2a)
 {

 }
 getchar();

posted on 2011-06-08 20:30 jolley 阅读(283) 评论(0)  编辑 收藏 引用

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理