array for ofVideoPlayer

Hello,

I am just not getting how to set up an array to store various ofVideoPlayer inside?

Or is it better to use a vector?

can somebody provide me with the lines of code for that, or links to this lines?

thanks,
scrow

hi

i used something like that before, maybe my code can help you: http://github.com/benben/openFrameworks-…-Mover/src/

thanks a lot for the reply.

so you are using e.g.
“string nameArray[100]” to create an array, right?

how to create a empty array? is there some sort of push method?

cheers!

you can do something like this, if you are familiar with pointers:

  
video * videoArray;  

and than in your cpp to runtime

  
videoArray = new video [number];  

this number doesn’t have to be a constant.

check here for more: http://cplusplus.com/doc/tutorial/dynamic/

or another method is this: http://www.fredosaurus.com/notes-cpp/ne-…-ample.html

hope this helped!

ben