Error: invalid use of member in static member function

后端 未结 3 1049
野性不改
野性不改 2021-01-05 03:01

I have two classes, and this is the header of one of them:

#ifndef WRAPPER_HPP
#define WRAPPER_HPP

#include 

using namespace std;

class W         


        
3条回答
  •  滥情空心
    2021-01-05 03:34

    Your class and member (screen) are not static, which means they don't actually exist. You can't access a non static member in a static function.

    Try to make your data members to be static.

提交回复
热议问题