Skip to content

StrBlob.h 头文件报错 #73

@kagtag

Description

@kagtag

参考文件为 https://github.com/Mooophy/Cpp-Primer/blob/master/ch15/ex15.34.35.36.38/StrBlob.h
运行系统为windows 7 professional
IDE为 Visual Studio 2015 professional

出现了两个错误

  1. StrBlob类的两个成员函数 StrBlobPtr bebin()和 StrBlobPtr end()在类外定义处报错
    Declaration is incompatible with StrBlobPtr StrBlob::begin()
    Declaration is incompatible with StrBlobPtr StrBlob::end()

  2. StrBlobPtr类中构造函数无法访问StrBlob类私有成员data
    StrBlobPtr(const StrBlob &a, const size_t sz=0):wptr(a.data),curr(sz){}
    报错信息为
    member StrBlob::data declared at .... is inaccessible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions