c++
lzxjxsy
这个作者很懒,什么都没留下…
展开
-
C++ tips
int to string std::string s = std::to_string(42);原创 2019-08-03 15:42:52 · 96 阅读 · 0 评论 -
error: ‘shared_ptr’ in namespace ‘std’ does not name a type
用G++编译项目的时候发生标题上的错误,原因是,这是c++ 11标准的。在给g++传递命令行的时候加上-std=c++0x就行了。 还需要在源码中#include 我的cmakelists里面要这样改: set(CMAKE_CXX_FLAGS “${CMAKE_CXX_FLAGS} -std=c++0x”) ...原创 2019-08-03 14:51:46 · 690 阅读 · 0 评论