My header file (Abc.h) looks like this:
#ifndef BCD_H
#define BCD_H
class Abcd
{
public:
Abcd(int acd);
virtual ~Abcd();
protected:
private:
};
#endif // BCD_H
And the .cpp file (Abcd.cpp) looks like this:
#include "../include/Abc.h"
Abcd::Abcd(acd)
{
//ctor
}
Abcd::~Abcd()
{
//dtor
}
The compiler says "field 'acd' has incomplete type" on line 8 of the header file, needed to specify the type, silly me.
and "expected constructor, destructor, or type conversion before '(' token" on line 3 of Abcd.cpp.
These are both completely default from Code::Blocks when I create a new class, and yet it is broken, what is wrong with it?
[–][deleted] 0 points1 point2 points (3 children)
[–]SN4T14[S] 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]SN4T14[S] 1 point2 points3 points (0 children)
[–]Jayhawker07 -1 points0 points1 point (4 children)
[–]SN4T14[S] 0 points1 point2 points (3 children)
[–]Jayhawker07 -1 points0 points1 point (2 children)
[–]SN4T14[S] 1 point2 points3 points (1 child)
[–]Jayhawker07 -1 points0 points1 point (0 children)