Possible Duplicate:
Passing a constant array to a function in C/C++
void Bar (int *values) {}
void Foo ()
{
int values[3] = { -5, 2, 8};
Bar (values);
}
But i want something like the following. How can i make this possible?
void Foo ()
{
Bar ({5,2,8}); //error C2143: syntax error : missing ')' before '{'
}