I'm getting the following errors:
C:\Users\James\cavewhere\dewalls\src\unit.cpp:6: error: C2511: 'dewalls::Unit::Unit(QString,dewalls::UnitType *)' : overloaded member function not found in 'dewalls::Unit'
C:\Users\James\cavewhere\dewalls\src\unit.cpp:9: error: C2550: 'dewalls::Unit::{ctor}' : constructor initializer lists are only allowed on constructor definitions
unit.h:
#ifndef UNIT_H
#define UNIT_H
class UnitType;
#include <QString>
namespace dewalls {
class Unit
{
public:
Unit(QString name, UnitType *type);
private:
QString _name;
UnitType *_type;
};
}
#endif // UNIT_H
unit.cpp:
#include "unit.h"
#include "unittype.h"
namespace dewalls {
Unit::Unit(QString name, UnitType *type) :
_name(name),
_type(type)
{
}
}
What for the love of god am I doing wrong?
Looks like
UnitType
should be in your namespace too