Just in case the question is about basic C++ syntax, here's exactly how you'd write it:
std::vector<std::vector<sf::Sprite> > foo() {
//do stuff here
}
The space between the two >s may or may not be necessary depending on your compiler.
It's hard to imagine why you thought that to be a sufficient answer to the OP's questions, given that an array cannot appear as the return type of a function in C++.
Then you might still have the same wrong understanding as the OP. Of course you can return an array:
int* foo() {
// ...
return my_areay;
}
The problem is that the size information is "lost". Thus you should bw either using a dynamic "array", aka vector, or use std::areay, which is a light C++11 wrapper, that stores the size as well.