Function returning array of vectors

Nov 17, 2011 at 8:54am
Hello,

I want to create a function that returns an array of vectors. So I have this code in the header file:

 
vector<Note*>[] getNoteVecor(void);


However, in the .cpp file, when I put the following code:

1
2
3
4
vector<Note*>[] getNoteVector(void)
{
	return notes;
}


THere's an error message that says, "Error: expected a ';'". What's wrong in here??
Nov 17, 2011 at 9:21am
You can't return arrays. Make it a vector of vectors. You also need to fully qualify std::vector, at least in the header file.
Topic archived. No new replies allowed.