Based on your earlier and revised post, it looks like you are trying to do many things at once. As a general rule, do one thing at a time. You are creating an array, initialized to specific values. Do that in one line. You are calling a function with an array as a parameter. Do that all at once.
You could also be asking about two other kinds of problems.
If you are talking about default parameters, they are not really anything magical.
When you write a function with a default parameter, like so:
int foo( int param = 42 );
what the compiler really does is make a stub function for you that automatically gets inlined, like so:
int foo(int);
inline int foo() { return foo(42); }
You can just as easily do that yourself, and in many pieces of professional code default parameters are forbidden and must be made explicitly by the programmer.
In your case, perhaps:
void VectorStuff( float* ); /* You probably want to make that "const float *" unless you intend to modify values */
inline void VectorStuff() { float p[3]={52.0f,53.1f,54.2f}; VectorStuff(p); )
Or your question might be referring to an unspecified number of parameters, there is something that comes from the ancient past of the language to handle that. It is not recommended because it is unsafe safe, but it might do what you are asking. There is a thing called variadic functions that allows you to pass whatever parameters you want.
Common examples are the printf and scanf family. The declaration of the function is simple enough:
int printf ( const char * format, ... ); With that signature you are required to pass a string, and then you can pass zero or more additional parameters. You can then access the parameters passed within the "... "by
using the va_xxx family of utilities. It is extremely unsafe for many reasons. Only certain types of data can be passed and there are automatic conversions that take place if your types don't match. It is up to the programmers to ensure the code handles the data types correctly, and there is no automatic mechanism in the language to detect the data type that was passed. If you do it wrong your program will behave badly, crash, or worse. Even though it is unsafe, it is something the language provides and if you are careful can solve some real programming problems.
There is similar functionality in languages like Java and C# that converts the arguments into an array of 'object' type, that is, the base class from which all classes are derived. These languages provide ways to determine the actual type of the data, so their solution is much safer but comes with its own set of hidden costs.