尝试构建时出现两组错误:
(在第一次构建时)
In constructor 'aa::aa(int)':
no matching function for call to 'bb:bb()'
candidates are: bb::bb(int)
bb:bb(const bb&)
(然后我再次点击构建并获得以下信息)
file not recognized: File truncated... takes me to assembly
collect2:ld returned 1 exit status
#ifndef BB_H
#define BB_H
class bb
{
public:
bb(int _m);
int m;
};
#endif // BB_H
#ifndef AA_H
#define AA_H
#include "AA/bb.h"
class aa : bb
{
public:
aa(int _i);
int i;
int j;
};
#endif // AA_H
#include "bb.h"
bb::bb(int _m)
{
m = _m * 5;
}
#include "aa.h"
aa::aa(int _i)
{
i = _i;
j = i + 1;
}