random select and play video files from an array?

New to this. I want to load several video files in an array and then randomly select one for playback. Here’s what I’ve got so far:
.h:

  
  
ofVideoPlayer chunks[3];  
  

.cpp:

  
  
#include "testApp.h"  
#include <iostream>  
using namespace std;  
  
//--------------------------------------------------------------  
void testApp::setup(){  
    char* chunk;  
    for (int i = 0; i < 3; i++)  
    {  
        sprintf(chunk, "%03i.ogv", i);  
        chunks[i].loadMovie(chunk);  
        cout << i << endl;  
    }  
    ofBackground(255,255,255);  
    srand(time(0));  
    int randNumb = rand() % 3;  
    chunks[randNumb].play();  
  
  
}  
  
//--------------------------------------------------------------  
void testApp::update(){  
    chunks.idleMovie();  
}  
  
//--------------------------------------------------------------  
void testApp::draw(){  
    ofSetColor(0xFFFFFF);  
  
    chunks.draw(20,20);  
  
  
  
  
  
  
  
  
  
}  
  

This is the message I’m receiving on build:

  
  
|24|error: request for member ‘idleMovie’ in ‘((testApp*)this)->testApp::chunks’, which is of non-class type ‘ofVideoPlayer [3]’|  
  
|31|error: request for member ‘draw’ in ‘((testApp*)this)->testApp::chunks’, which is of non-class type ‘ofVideoPlayer [3]’|  

No idea what this means or what to do next. Any help is greatly appreciated. Thanks!

you load your videos correctly, but then you make a few errors:

  
  
//in testapp.h you have to declare the variable for your random number  
int randNumb;  
...  
//int testapp.cpp, after setting the background  
randNumb = (int)(ofRandom(0,3));  
chunks[randNumb].play();  
...  
//in update  
chunks[randNumb].idleMovie();  
...  
//in draw  
chunks[randNumb].draw(20,20);  
  

Thanks! Totally obvious now.