0

I was going through the wiseroute example given in the omnetpp and mixim. and found the following code.

   WiseRoute(): BaseNetwLayer()
, routeTable()
, floodTable()
, headerLength(0)
, macaddress()
, sinkAddress()
, useSimTracer(false)
, rssiThreshold(0)
, routeFloodsInterval(0)
, floodSeqNumber(0)
, tracer(NULL)
, routeFloodTimer(NULL)
, nbDataPacketsForwarded(0)
, nbDataPacketsReceived(0)
, nbDataPacketsSent(0)
, nbDuplicatedFloodsReceived(0)
, nbFloodsSent(0)
, nbPureUnicastSent(0)
, nbRouteFloodsSent(0)
, nbRouteFloodsReceived(0)
, nbUnicastFloodForwarded(0)
, nbPureUnicastForwarded(0)
, nbGetRouteFailures(0)
, nbRoutesRecorded(0)
, nbHops(0)
, receivedRSSI()
, routeRSSI()
, allReceivedRSSI()
, allReceivedBER()
, routeBER()
, receivedBER()
, nextHopSelectionForSink()
, trace(false), stats(false), debug(false)

{}

Now WiseRoute() is the default constructor and it does nothing. but what does all the functions in between the function name and the body do??

user1184856
  • 5
  • 1
  • 2
  • possible duplicate of [What is this weird colon-member syntax in the constructor?](http://stackoverflow.com/questions/1711990/what-is-this-weird-colon-member-syntax-in-the-constructor) – Alok Save Mar 01 '12 at 11:42

1 Answers1

1

It is a Member initialization list. It initializes the members of your WiseRoute class.

Community
  • 1
  • 1
Alok Save
  • 202,538
  • 53
  • 430
  • 533