(I'll try to keep this short and simple)

I am just starting research on what should I use in C++. The scenario is. Open dir / sub dir, read in file names, store the absolute path and filename for later use. an array of type vector should be able to do this, Yes?

But unlike arrays, their size can change dynamically, with their storage being handled automatically by the container.
vector - C++ Reference

If this vector has the ability to dynamically grow due to not knowing what size is needed ahead of time, and each time the program is ran it can be different it should be able to be used to just gather up filenames with there paths and store them for later use and traverse down the list of names (both ways). even do a compare name then return if found. even select a specif element by a number when imputed.

mock code, so don't get all techy on it.
Code:
print(what number file wanted>);

num = getNum()

fileName =  vector.at(num);
that too would be faster then traversing down a list until found, then return data.

no real size limits? 10,000,000 files isn't too big even?

what are the pros, cons ?