invalid use of incomplete type ‘class

I added a new class to a project,I just want to create an instance of MobileNode class but It is an abstract class so I wrote MyNode1 class that derived from MobileNode class to create an instance, but I encounter this error:

error: invalid use of incomplete type ‘class MobileNode’
class MyNode1 : MobileNode
==============================================================
this is the class code:


#ifndef __ns_mynode1_h__
#define __ns_mynode1_h__
#include "mobilenode.h"
class MyNode1 : MobileNode
{

friend class TdmaMac;
public:
MyNode1() {};
MyNode1* n2;

};
#endif
============================================
what is wrong with this class
Sounds like you're trying to use the MobileNode class before you fully define MobileNode.

How are you defining your MobileNode class and its implementation? What specific line is the error at?
Topic archived. No new replies allowed.