OMNeT++ Community Site
  Welcome to OMNeT++ Community Site Monday, October 13 2008 

Mailing list archive (omnetpp-l at omnetpp.org)


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Omnetpp-l] Defining own application layer message



Hi, all, i want to define my own application layer message, here is the code:

cplusplus {{
#include <string>
#include "ApplPkt_m.h"
}};

class ApplPkt;

message NewApplPkt extends ApplPkt
{
   fields:
    string fragment;
};


when i compile it, the compiler keeps giving these errors:

NewApplLayer.cc(134) : error C2664: 'NewApplPkt::setFragment' : cannot convert p
arameter 1 from 'std::string' to 'const char *'
        No user-defined-conversion operator available that can perform this conv
ersion, or the operator cannot be called
NewApplLayer.cc(155) : error C2664: 'NewApplPkt::setFragment' : cannot convert p
arameter 1 from 'std::string' to 'const char *'
        No user-defined-conversion operator available that can perform this conv
ersion, or the operator cannot be called


please help, thanks a lot!


Not happy with your email address?
Get the one you really want - millions of new email addresses available now at Yahoo!
_______________________________________________
Omnetpp-l mailing list
Omnetpp-l at xxx
http://lists.omnetpp.org/mailman/listinfo/omnetpp-l

Home | Main Index | Thread Index


 Copyright © 2008 OMNeT++ Community Site
 All trademarks and copyrights on this page are owned by their respective owners.
Powered By GeekLog v1.3.7sr1 
Page created in 0.04 seconds