You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mech-user@test1-pc:~/2015winter/2015-soft3/20151202/src/enshu_20151202/src$ g++ -o GCTest GCTest.cpp -lpthread
In file included from /usr/include/boost/shared_ptr.hpp:17:0,
from GCTest.cpp:8:
/usr/include/boost/smart_ptr/shared_ptr.hpp: In instantiation of ‘boost::shared_ptr<T>::shared_ptr(Y*) [with Y = std::vector<int>; T = int]’:
GCTest.cpp:67:49: required from here
/usr/include/boost/smart_ptr/shared_ptr.hpp:352:47: error: cannot convert ‘std::vector<int>*’ to ‘boost::shared_ptr<int>::element_type* {aka int*}’ in initialization
explicit shared_ptr( Y * p ): px( p ), pn() // Y must be complete
@k-okada
include <boost/shared_ptr.hpp>をインクルードして
typedef boost::shared_ptr SharedPtr;
typedef vector* SharedPtrVec;
とすると
というエラーが出ます
http://www.kmonos.net/alang/boost/classes/shared_ptr.html
このサイトを参照したのですが、stdとboostの関係がよくわかりません。
教えていただけないでしょうか?
土井
The text was updated successfully, but these errors were encountered: