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.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
I am trying to create and instantiate an I2CSlave object visible to an entire class only. In C++, when you declare the object, the constructor has to run. What I want to do is declare the object in classwide space and have my I2CCommandReceiver class instantiate the I2CSlave object. Whatever I try, the compiler throws an error. Its not as simple as C#, but there has to be a way to do it.