Why can't my class access its own privately declared variable of another object

后端 未结 0 1475
醉梦人生
醉梦人生 2020-12-01 04:19

I am getting the following error

game.cpp:19:35: error: ‘Player Game::p1’ is private within this context
   19 |  Point playerMove = tictactoeGame.p1.makeMove         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题