Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7413379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:41:09+00:00 2026-05-29T06:41:09+00:00

I am using Code::Blocks and Mingw32 with the SDL libraries. The error appears at

  • 0

I am using Code::Blocks and Mingw32 with the SDL libraries. The error appears at line 13 of my code (commented below).

After some searching I believed it to be a missing semicolon(;), this doesn’t appear to be the case here though. Additional research threw up the fact that it may be an error in an include file.

Unfortunately there are no errors in the includes and even when the include is commented out this error persists. When the enum block is commented out the error jumps to the end of the class declaration.

#ifndef _TILE_H_
#define _TILE_H_

#include "Define.h"

enum
{
    TILE_TYPE_NONE = 0,
    TILE_TYPE_GROUND,
    TILE_TYPE_RAMPUP,
    TILE_TYPE_RAISED,
    TILE_TYPE_RAMPDOWN
}; //error occurs here (line 13)

class Tile
{
public:
    int TileID;
    int TypeID;

public:
    Tile();
};

#endif

This actually started happening after adding a new class, however the new class is completely unrelated and does not use, include or inherit from the posted one at all.

Any advice or information would be really appreciated.

EDIT (adding Define.h):

#ifndef _DEFINE_H_
#define _DEFINE_H_

#define MAP_WIDTH 40
#define MAP_HEIGHT 40

#define TILE_SIZE 16

#define WINDOW_WIDTH 640
#define WINDOW_HEIGHT 480

#endif
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T06:41:10+00:00Added an answer on May 29, 2026 at 6:41 am

    You have a file with this:

    #include "Something.h"
    #include "Tile.h"
    

    In Something.h, you have this:

    class Something {
        // ...
    }
    

    You are missing a semicolon, so the compiler sees:

    class Something {
        // ...
    }
    enum {
    };
    

    Which is one declaration containing two types (a class and an enum), which is not allowed. The semicolon is required after class, struct, and enum because you can declare instances of a new type in the same declaration as the type:

    struct Point { int x; int y; } my_point;
    

    (Also, names starting with _ and a capital letter are reserved. Use TILE_H instead of _TILE_H_.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im currently using the SDL-devel-1.2.13-mingw32 library in code blocks 8.02. with the mingw 5.1.6
I did some reading on IDE`s (I am currently using Code::Blocks) and everyone appears
I'm having some difficulty with linking against the Lua 5.1 libraries using Code::Blocks and
I have ported some code from Mingw which i wrote using code::blocks, to visual
Using Code::Blocks w/ mingw, and trying to use GLee for some OpenGL on windows.
I am using SFML, and I am building an application in Code::Blocks and mingw32.
Hello I'm trying to write some tool using code::blocks, wxWidgets and libxml2 on Windows
I'm using Code::Blocks to compile a shared library on Ubuntu. When I make a
We're developing a Qt project using the Code::Blocks IDE with the QtWorkbench plugin. We'd
Out of habit I've been using try/catch blocks in my application code for all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.