参考文件为 https://github.com/Mooophy/Cpp-Primer/blob/master/ch15/ex15.34.35.36.38/StrBlob.h
运行系统为windows 7 professional
IDE为 Visual Studio 2015 professional
出现了两个错误
-
StrBlob类的两个成员函数 StrBlobPtr bebin()和 StrBlobPtr end()在类外定义处报错
Declaration is incompatible with StrBlobPtr StrBlob::begin()
Declaration is incompatible with StrBlobPtr StrBlob::end()
-
StrBlobPtr类中构造函数无法访问StrBlob类私有成员data
StrBlobPtr(const StrBlob &a, const size_t sz=0):wptr(a.data),curr(sz){}
报错信息为
member StrBlob::data declared at .... is inaccessible.
参考文件为 https://github.com/Mooophy/Cpp-Primer/blob/master/ch15/ex15.34.35.36.38/StrBlob.h
运行系统为windows 7 professional
IDE为 Visual Studio 2015 professional
出现了两个错误
StrBlob类的两个成员函数 StrBlobPtr bebin()和 StrBlobPtr end()在类外定义处报错
Declaration is incompatible with StrBlobPtr StrBlob::begin()
Declaration is incompatible with StrBlobPtr StrBlob::end()
StrBlobPtr类中构造函数无法访问StrBlob类私有成员data
StrBlobPtr(const StrBlob &a, const size_t sz=0):wptr(a.data),curr(sz){}
报错信息为
member StrBlob::data declared at .... is inaccessible.