Can I do this in C++ (if yes, what is the syntax?):

```
void func(string* strs) {
    // do something
}
func({"abc", "cde"});

```

I want to pass an array to a function, without instantiating it as a variable.
['https://Stackoverflow.com/questions/2767139', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/187141/']
It can't be done in the current C++, as defined by C++03.

The feature you are looking for is called "compound literals". It is present in C language, as defined by C99 (with C-specific capabilities, of course), but not in C++.

A similar feature is planned for C++ as well, but it is not there yet.
Use a variadic function to pass in unlimited untyped information into a function. Then do whatever you want with the passed in data, such as stuffing it into an internal array.

[variadic function](http://en.wikipedia.org/wiki/Variadic_function#Variadic_functions_in_C.2C_Objective-C.2C_C.2B.2B.2C_and_D)