上一页 1 ··· 6 7 8 9 10 11 12 13 下一页
1 #include 2 int str_to_int(const char *str,int *num); 3 void int_to_str(char str[],const int strLen,const int num); 4 5 int main(int argc,char *argv[]) 6 { 7 char str[16]; 8 int ret... Read More
posted @ 2016-06-21 10:09 你好阿汤哥 Views(225) Comments(0) Diggs(0) Edit
参考文献:http://blog.csdn.net/zhaqiwen/article/details/7904515 近日在看项目中的框架代码时,发现了了一个奇特的语法:长度为0的数组例如 uint8_t buf[0]; 我从未见过这样的写法,所以在网上查了查资料,了解并记录下来. 在标准的C/C+ Read More
posted @ 2016-06-05 14:12 你好阿汤哥 Views(9832) Comments(0) Diggs(0) Edit
参考文章:http://blog.csdn.net/thenile/article/details/6318521 在参考文章的基础上,去掉了代码中C++特有的语法和数据类型,用纯C语言实现了获取汉字拼音的功能,使得代码在纯C项目中也能使用. 编码格式: gbk 测试字符串: const char* Read More
posted @ 2016-05-30 10:42 你好阿汤哥 Views(5699) Comments(0) Diggs(0) Edit
1 #include 2 #include 3 #include 4 #include 5 6 bool between(uint32_t start,uint32_t end,uint32_t aim); 7 char get_first_letter(wchar_t wchar); 8 void get_first_letters(const char *szChi... Read More
posted @ 2016-05-29 22:26 你好阿汤哥 Views(3622) Comments(0) Diggs(0) Edit
测试文件: 测试结果: Read More
posted @ 2016-05-27 23:03 你好阿汤哥 Views(603) Comments(0) Diggs(0) Edit
另一种方法: Read More
posted @ 2016-05-20 18:58 你好阿汤哥 Views(453) Comments(0) Diggs(0) Edit
将以下两个文件放置在X:XXX\Sublime Text 3x64\Data\Packages\User目录下,就可以为sublime3添加protobuf文件的语法高亮规则. 文件名:Protobuf.JSON-tmLanguage 文件内容: 文件名:Protobuf.tmLanguage 文件 Read More
posted @ 2016-05-11 09:49 你好阿汤哥 Views(2351) Comments(0) Diggs(0) Edit
一个简单的epoll demo ,同时接受多个客户端连接,并把接收到的字符串转化为大写字母返回给客户端 Read More
posted @ 2016-05-08 15:48 你好阿汤哥 Views(4181) Comments(0) Diggs(0) Edit
1 #include 2 void check_endian() 3 { 4 union 5 { 6 short value; 7 char union_bytes[sizeof(short)]; 8 }tester; 9 tester.value = 0x0102; 10 if( (tester.uni... Read More
posted @ 2016-04-11 16:26 你好阿汤哥 Views(511) Comments(0) Diggs(0) Edit
原文转自:http://zhoushijun.iteye.com/blog/1942475 方法: 1、修改源地址:cp /etc/apt/sources.list /etc/apt/sources.list.bakvim /etc/apt/sources.list 加入如下内容(中科大的): de Read More
posted @ 2016-04-08 12:26 你好阿汤哥 Views(911) Comments(0) Diggs(0) Edit
上一页 1 ··· 6 7 8 9 10 11 12 13 下一页