I get the error error C2514: 'BLOCK' : CLASS HAS NO CONSTRUCTOR with a simple class like this:
BLOCK.h
#pragma once
#include "helpful.h"
class WORLD;
class BLOCK
{
public:
short int type;
void Render();
BLOCK();
~BLOCK(void);
};
BLOCK.cpp
#include "BLOCK.h"
#include "WORLD.h"
BLOCK::BLOCK(void)
{
}
void BLOCK::Render()
{
}
BLOCK::~BLOCK(void)
{
}
But the BLOCK class is defined, no?
I found my mistake: The call to BLOCK's constructor was in another file, but the header for BLOCK wasn't included, all I had was class BLOCK;. Changed it instead to #include BLOCK.h, problem solved.
You need to look for it in MYCLASS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With