I get a bug, and I don't know how to fix it, any help ?
background information: I have a class named Hello inside header file named Hello.h that wants to use some functions of class A in header file A.h, but class A is inside namespace a4.
1 2 3 4 5 6 7 8 9 10 11 12
#include <iostream>
#include "A.h"
usingnamespace std;
// A is a class and the name of header file, and no this does not create any problems.
class Hello : public A { // Error on this line!
private:
//...
public:
//...
};
Error message:
Hello.h:10:40: error: expected class-name before ‘{’ token
class Hello : public A {
^
compilation terminated due to -Wfatal-errors.