fishonesea

android 驱动,移植,qq群:91386163 推荐《Android深度探索(卷1):HAL与驱动开发》
  博客园  :: 首页  :: 新随笔  :: 管理

2011年11月28日

摘要: 今天看到一个比较好的代码,拿过来分享一下,代码的主题是用户可以输入256个任意字符,然后以格式提取的方式来得到数据,是不是挺好的。代码如下:#include <stdio.h>void main(){ static unsigned char sInput[256]; int iRet; int offset; printf("please input offset:"); fgets(sInput, sizeof(sInput), stdin); iRet = sscanf(sInput, "%d", &offset); if (i 阅读全文

posted @ 2011-11-28 19:50 fishonesea 阅读(221) 评论(0) 推荐(0) 编辑