memset和printf(buf)编译出错

1.使用memset、memcpy等函数需要包含string.h而不是strings.h

2.error: format not a string literal and no format arguments

  

printf(buf);    //liunx下编译上述代码时出现编译报错。  

  //解决方法:  

将printf(buf) 改为:  printf("%s",buf)

 

 

 

 

posted @ 2013-03-31 16:29  cococo点点  阅读(291)  评论(0编辑  收藏  举报