error saying class defined as public is private
问题 Making a 3D Tic Tac Toe game using class inheritance. Compiler error as follows. line: 43 [Error] 'void CPUClass::cpu()' is private 190 [Error] within this context Looking at my code, I've clearly defined cpu() as public. Any ideas what I'm overlooking? #include <iostream> #include <time.h> //seeding random #include <windows.h> using namespace std; class TTT { public: void setup(); void display(); void cpu(); void player(); void check(int); protected: int cp; //comp points int pp; //player