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.
Hi all,
does anyone have a suggestion for storing a vector of DigitalOuts? I'm reading pin configuration at startup, so it's unknown how many DigitalOut pins will be connected at compile time.
The following doesn't compile, and my c++ is not good enough to understand why...
#include "mbed.h" #include <vector> vector<DigitalOut> outs; int main() { outs.push_back( *(new DigitalOut( p17 )) ); while(1) { // do whatever } }thanks, Paul