Passing arrays explicitly
I was wondering if you could somehow pass an array to a function like you can in some other languages (like perl).
For example, say you had the function below:
Code:
void getVector( std::vector<std::string>& array ) { return; }
Could you call that function in any way remotely similar to this (in concept, not style)?
Code:
getVector( { "this is a string", "and another", "and on and on" } );
I ask because I think I remember seeing something like this before, in c++ code, but from the lack of information on it I'm thinking that this just isn't possible. I'd also like to use this, for readabilities sake.