Error: no matching function for call

24 views
Skip to first unread message

Gabriel

unread,
Nov 6, 2009, 1:59:39 PM11/6/09
to omnetpp
Hi there,

I am having problems while creating a very simple module in Omnet++.
Here i post the code and the error

This is decider.cc

#include <stdio.h>
#include "Decider.h"

Define_Module(Decider);

Decider::Decider(const char *name, cModule *parentmodule, unsigned
stacksize):cSimpleModule(name, parentmodule,stacksize){
decide();
}

and this is decider.h

#ifndef DECIDER_H_
#define DECIDER_H_

#include <omnetpp.h>

class Decider : public cSimpleModule
{ //line 14
public:
Decider(const char *name, cModule *parentmodule, unsigned stacksize
= 0); //line 16
virtual void decide();

};
#endif

The error i get is the following:

Decider.cc: In function ‘cObject* __uniquename_11()’:
Decider.cc:11: error: no matching function for call to
‘Decider::Decider()’
Decider.h:16: note: candidates are: Decider::Decider(const char*,
cModule*, unsigned int)
Decider.h:14: note: Decider::Decider(const Decider&)


I dont understand what the problem is, the names of functions and
parameters are correct.

Any one has any clue?
Any help is very much appreciated

Thanks,
Gabriel

Einar César

unread,
Aug 29, 2014, 1:38:24 PM8/29/14
to omn...@googlegroups.com, chek...@gmail.com
Simple modules are never instantiated by the user directly, but rather by the simulation kernel. See manual on Section 4.3.2.
Reply all
Reply to author
Forward
0 new messages