首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

如何出现了未定义

2012-04-06 
怎么出现了未定义?C/C++ code#include boost/shared_ptr.hpp#include memory #include iostreamusin

怎么出现了未定义?

C/C++ code
#include <boost/shared_ptr.hpp>#include <memory> #include <iostream>using namespace boost;int main() {     boost::weak_ptr<int> wp0;//error C2079: “wp0”使用未定义的 class“boost::weak_ptr<Y>”        //咋回事?        //看了boost中有定义,怎么就不能使用呢?为啥?        //前辈们多多指教,我是个新手。    return (0); } 


[解决办法]
weak_ptr.hpp
[解决办法]
你包含错误的头文件了

热点排行