Report
9 months ago.

If this isn't inheritance, what is this concept (C++)?

Hi, I am kinda new to C++ and trying to understand MbedSmartRestMain code. In the file name MbedAgent.cpp;/media/uploads/dremotion/mbedagent.cpp

On Line #5, there is this piece of code written:-

MbedAgent::MbedAgent(DeviceInfo& deviceInfo): client(), tpl(), _bootstrap(deviceInfo), _integration(client, tpl, deviceInfo), lcdThirdLineBlank(true), signal(deviceInfo), temp(), poti(), gps(), acc(), sock(), pool(), _operationSupport(tpl, pool)

This doesn't seem like it's inheritance and I am not unable to understand this. Please help

Comment on this question

1 Answer

9 months ago.

MbedAgent::MbedAgent(DeviceInfo& deviceInfo): client(), tpl(), _bootstrap(deviceInfo), _integration(client, tpl, deviceInfo), lcdThirdLineBlank(true), signal(deviceInfo), temp(), poti(), gps(), acc(), sock(), pool(), _operationSupport(tpl, pool)

Look up initialization list C++

This video might help https://www.youtube.com/watch?v=BYWGdRuy1Uw

Thanks Bill. That solves it.

posted by Priyank Agarwal 25 May 2018

To post an answer, please log in.