简体   繁体   中英

C++ Non-Class member compile error in Code::Blocks?

I am attempting to follow the tutorial found here to learn the basic idea behind programming roguelike game. I am using Code::Blocks 10.05 running portable from my usb and compiling with MinGW. Console.h also came from the website I linked above.

I have hit a road block when I have attempted to set up just this class to ensure everything is working:

#include <conio.h>
#include "Console.h"

int main( void )
{
    console.Clear();
    return 0;
}

When I attempt to use the I get the following error:

Error: request for member 'Clear' in 'console', which is of non-class type 'Win32Console()'|

Any help is appreciated, thanks!

Edit

I reinstalled MinGW and Code::Blocks after promptly ruining them for myself and am now back with the error:

undefined reference to `Win32Console::Win32Console()

before adding the header file, paste this line: #define _WIN32 . Its possible that the _WIN32 isn't defined?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM