From: [email protected] <[email protected]>
Subject: Packet::copy() issue with ns2.33
To: "ns-users" <[email protected]>
Date: Monday, 1 June, 2009, 1:22 PM

Hi,
    I am writing a new protocol in NS2 and using application level data packets 
by extending AppData. So I have class ABC:: public AppData and class 
PQR::public ABC. I have defined the size() and copy() methods for both, and 
also defined the constants in packet.h in enum AppDataType.

Now, when I run the simulation, I get an error that says...
-----------------------------------------------------------------------
pure virtual method called
terminate called without an active exception
-----------------------------------------------------------------------
Upon debugging, I found out that this error comes when it executes 
Packet::copy(), specifically the statement
p->data_ = data_-> copy()

here, data_->copy() happens to be a pure virtual function, which is why I am
 getting the error, but I am wondering what is the cause.. I have defined the 
proper copy() functions for new AppData types...

It would be great if someone points me out my mistake.. If someone wants more 
information about my code, I would be happy to share it ...

thank you,

regards,
Swaroop





       Explore your hobbies and interests. Click here to begin.


      Explore and discover exciting holidays and getaways with Yahoo! India 
Travel http://in.travel.yahoo.com/

Reply via email to