C++ const question

后端 未结 7 1573
遥遥无期
遥遥无期 2020-12-20 16:58

If I do this:

// In header 
class Foo {
void foo(bar*);
};

// In cpp
void Foo::foo(bar* const pBar) {
//Stuff
}

The compiler does not comp

相关标签:
7条回答
  • 2020-12-20 17:41

    So the second const in:

    void Foo::foo(const bar* const);
    

    Is not part of the method signature?

    0 讨论(0)
提交回复
热议问题