Calling private method in C++

后端 未结 12 2215
忘了有多久
忘了有多久 2020-11-27 20:02

This is purely a theoretical question, I know that if someone declares a method private, you probably shouldn\'t call it. I managed to call private virtual methods and chang

12条回答
  •  无人及你
    2020-11-27 20:36

    You have friend classes and functions.

    I know that if someone declares a method private, you probably shouldn't call it.

    The point is not 'you shouldn't call it', it's just 'you cannot call it'. What on earth are you trying to do?

提交回复
热议问题