我在CodeBlocks上收到此错误,但是如果我修复它,那么它会从修复第一个错误中触发错误。我该如何解决?

问题描述 投票:0回答:1

编译后,我在Code :: Blocks中不断收到错误:

 '''
    error: expected ';' after class definition
 '''

,但是当我添加分号时,它给了我:

    internal compiler error: in gt_pch_note_object, at 
    ggc-common.c:276
    };

指定我刚才在花括号后面添加的分号。无论哪种方式,仍然存在错误。有什么问题吗?我正在写的课是:

class Game{
     public:
     Game();
     ~Game();
     void init(const char* title, int xpos, int ypos, int 
     width, int height, bool fullscreen);
     void handleEvents();
     void update();
     void render();
     void clean();
     bool running();
     private:
     bool isRunning;
     SDL_Window *window;
     SDL_Renderer *renderer;
};

我正在使用SDL2库编写游戏。我的代码有问题吗?

c++ codeblocks gnu
1个回答
0
投票

内部编译器错误通常很棘手,即使您的代码很好,它们也属于编译器内部的错误。

我建议尝试使用其他编译器,也许是更新的版本。

参见:Similar Question

© www.soinside.com 2019 - 2024. All rights reserved.