About 52 results
Open links in new tab
  1. variadic functions - Variable number of arguments in C++ ... - Stack ...

    505 In C++11 you have two new options, as the Variadic arguments reference page in the Alternatives section states: Variadic templates can also be used to create functions that take variable number of …

  2. Variadic templates in C++ and how they work - Stack Overflow

    May 28, 2020 · The variadic template makes the compiler generate all of these "on demand" and saves you from writing them all out. One way to look at it is that regular function templates (with only type …

  3. How to define variadic **argv in C function - Stack Overflow

    Sep 16, 2025 · How to define variadic **argv in C function Asked 5 months ago Modified 4 months ago Viewed 510 times

  4. c++ - Variadic templates - Stack Overflow

    Sep 3, 2010 · variadic templates (accepting an arbitrary number of parameters) The purpose of the variadic member template is to forward arguments to the object referred to by ptr.

  5. Technically, how do variadic functions work? How does printf work?

    Apr 16, 2014 · I know I can use va_arg to write my own variadic functions, but how do variadic functions work under the hood, i.e. on the assembly instruction level? E.g., how is it possible that printf takes a

  6. Specifying one type for all arguments passed to variadic function or ...

    Specifying one type for all arguments passed to variadic function or variadic template function w/out using array, vector, structs, etc? Asked 15 years, 5 months ago Modified 1 year, 1 month ago …

  7. How to make a variadic macro (variable number of arguments)

    How to make a variadic macro (variable number of arguments) Asked 16 years, 11 months ago Modified 2 years, 7 months ago Viewed 287k times

  8. What is the easiest way to print a variadic parameter pack using std ...

    These are variadic functions which use templates to print different data types. You can check its use in a producer-consumer problem on my github: So, here is my code:

  9. Do variadic functions need to have a different calling convention to ...

    Jul 8, 2023 · In C, calling a variadic functions are 'special' and not to be treated as regular functions or vice versa. Calling a variadic function through a regular function pointer, or vice-versa invokes unde...

  10. How to assign variadic/variable arguments in C++

    Feb 21, 2022 · That beeing set, variadic arguments are a very unsafe way of passing variables. In your example, if someone changes the type of a, b, and c to another type, you will run into serious …