1

Possible Duplicate:
In a C function declaration, what does “…” as the last parameter do?

What does this mean ,...); it is written at the end of a function in a code i am debuging.

like this void abc( int a, int b, ...);

Community
  • 1
  • 1
PUG
  • 4,301
  • 13
  • 73
  • 115
  • As a C++ coder you should preferably not use ellipsis. http://www.learncpp.com/cpp-tutorial/714-ellipses-and-why-to-avoid-them/ – DumbCoder Jul 20 '10 at 07:39

2 Answers2

2

It means the function can take any number of extra arguments. For example, consider printf; the first argument is the format string, and then there can be any number of arguments after that for all of the modifiers. This would be represented by using ... after the first argument when defining the function.

user11977
  • 1,783
  • 11
  • 13
2

That specifies a variable number of arguments which can be accessed using the macros in the cstdarg header.

Philipp
  • 48,066
  • 12
  • 84
  • 109