小编use*_*530的帖子

C++错误:请求'grmanager'中的成员'...',它是非类型的'GraphicsManager'

我的类GraphicsManager已经出错了.

GraphicsManager.cpp:

#include "C:\Users\Chris Uzzolina\Desktop\obj\include\GraphicsManager.h"
#include <SDL.h>
#include <string>
GraphicsManager::GraphicsManager(int SCREEN_WIDTH, int SCREEN_HEIGHT, int SCREEN_BPP,  std::string caption, SDL_Surface *screen)
{

}

GraphicsManager::~GraphicsManager()
{
    //dtor
}
bool init(int SCREEN_WIDTH, int SCREEN_HEIGHT, int SCREEN_BPP, std::string caption, SDL_Surface *scr)
{
    //Initialize all SDL subsystems
    if( SDL_Init( SDL_INIT_EVERYTHING ) == -1 )
    {
        return false;
    }

    //Set up the screen
    scr = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP, SDL_SWSURFACE );

    //If there was an error in setting up the screen
    if( scr == NULL )
    { …
Run Code Online (Sandbox Code Playgroud)

c++ sdl

5
推荐指数
1
解决办法
662
查看次数

标签 统计

c++ ×1

sdl ×1