problem with forward declaration
Hi all,
I’ve got a problem with a forward declaration. My source tree structure is as follows:
- + src
- role.h
- role.cpp
- + daemon
- daemon.h
- daemon.cpp
where daemon.h uses Role via forward declaration:
- // daemon.h
- // forward declaration of the Role implementation
- class Role;
- ...
- }
and when I compile the project I got the following error for the Daemon::roles() method:
- error: ‘Role’ was not declared in this scope
Am I missing something?
4 replies
You must log in to post a reply. Not a member yet? Register here!



