No you can’t.
The protected accessor on a method means that only the following can access it:
- the class itself
- class that inherits from it
- another class with friendship
https://en.cppreference.com/w/cpp/language/access#Protected_member_access
solved Call protected function in main class [closed]