摘要: 1. void* 必须强制类型转换,void* 不能解引用2. 通过函数改变指针所指向的值int parse_int(const std::string line, int* outputvalue) { int a=12; *outputvalue=a;//通过改变指针所指变量的值,而不是改变... 阅读全文
posted @ 2014-11-12 17:09 曹守鑫 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 1 . 必须将头文件的.h 和实现文件的.cpp都加入到 main文件中不然会抛出c++ undefined reference to `test::Test1::parse_int 异常 阅读全文
posted @ 2014-11-12 11:43 曹守鑫 阅读(306) 评论(0) 推荐(0) 编辑