bool bitarray :: add (bool n, ...)

How to go through all the elements passed to the function?

  • Just as in C. However, this is a question for you: how are you going to pass information to the function about how many of these arguments? Without this, it is impossible to answer the question of where "everything" ends. - AnT
  • See <stdarg.h> . va_list and corresponding macros. Just keep in mind that you cannot pull the number of parameters passed directly from the call ... - Harry
  • In C ++, you should not implement such functions. - VTT
  • And why do you need old variadic functions in C ++? Take templates with a variable number of parameters. - HolyBlackCat

0