Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 3 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
1 Answer
6 years, 3 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