error: invalid use of incomplete type ‘class

Hi,
I wrote a new class and add it to a project but I encounter this error
what is wrong with this code?

error: invalid use of incomplete type ‘class MobileNode’
class MyNode1 : MobileNode

===========================================================
#pragma once
#ifndef __ns_my_node_1_h__
#define __ns_my_node_1_h__
//#include "mynode1.h"
#include "mobilenode.h"
#include "object.h"
#include "trace.h"
#include "lib/bsd-list.h"
#include "phy.h"
#include "topography.h"
#include "arp.h"
#include "node.h"
#include "gridkeeper.h"
#include "energy-model.h"
#include "location.h"
#include "mac-tdma.h"
class MyNode1 : MobileNode
{
public:
MyNode1();
MyNode1* n2;

};
#endif
==================================================
what is wrong with this code?
That depends on the content of the includes. I suggest that you don't include things you don't need.

You have a problem when you have circular includes. Headers must not include each other.
Topic archived. No new replies allowed.