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] Defining own application layer message



Hi, everyone, i would like to define my own application layer message, based on this example: http://www.omnetpp.org/listarchive/msg10700.php, here is the code for my message:

cplusplus {{
#include "ApplPkt_m.h"
typedef std::list<string> fragmentList;
}};

class ApplPkt;
class noncobject fragmentList;

message NewApplPkt extends ApplPkt
{
   fields:
      fragmentList fragments;
};

when I compile it, the compiler gives these errors:
NewApplPkt_m.cc
c:\omnetpp\project\NewApplPkt_m.h(21) : error C2065: 'string' : undeclared ident
ifier
NewApplPkt_m.cc(72) : error C2512: 'std::list' : no appropriate default construc
tor available
NewApplPkt_m.cc(76) : error C2512: 'std::list' : no appropriate default construc
tor available
NewApplPkt_m.cc(92) : error C2678: binary '=' : no operator found which takes a
left-hand operand of type 'fragmentList' (or there is no acceptable conversion)
        C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\list(524): could
 be 'std::list<_Ty,_Ax> &std::list<_Ty,_Ax>::operator =(const std::list<_Ty,_Ax>
 &)'
        while trying to match the argument list '(fragmentList, const fragmentLi
st)'
NewApplPkt_m.cc(92) : error C2582: 'operator =' function is unavailable in 'std:
:list'
NewApplPkt_m.cc(115) : error C2678: binary '=' : no operator found which takes a
 left-hand operand of type 'fragmentList' (or there is no acceptable conversion)

        C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\list(524): could
 be 'std::list<_Ty,_Ax> &std::list<_Ty,_Ax>::operator =(const std::list<_Ty,_Ax>
 &)'
        while trying to match the argument list '(fragmentList, const fragmentLi
st)'
NewApplPkt_m.cc(115) : error C2582: 'operator =' function is unavailable in 'std
::list'

It looks like there is something wrong with the list field. I am really confused about these, please help. Thanks!!!


      __________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html
_______________________________________________
OMNeT++ Mailing List
options: http://lists.omnetpp.org/mailman/listinfo/omnetpp-l
archive: http://www.omnetpp.org/listarchive/index.php

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