- 博客(3)
- 收藏
- 关注
转载 c库,c++链接时碰到undefined reference
库文件由c代码生成,在c++代码中链接库中的函数时,会碰到undefined reference的问题。 把与c语言库相关的头文件包含添加一个extern "C"的声明即可。如下: 问题解决。
2014-01-28 15:28:27 582
原创 pthread 子线程全局变量访问
方法1: 全局变量声明 volatile struct MY_STRUCT *Data; void* my_thread(void* param); // 子线程内 void* my_thread(void* param){ MY_STRUCT p =(MY_STRUCT*) Data; /* */ } 方法2: 声明 struct
2014-01-15 17:00:07 829
转载 snprintf VS itoa
use snprintf, it's the new more portable itoa. itoa is not part of standard C, nor is it part of standard C++; but, a lot of compilers and associated libraries support it. An example of a spri
2014-01-10 20:40:37 678
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人