Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ variable arguments function

template <typename T>
void db(T t)
{
    cout << t <<" ";
}

template<typename T, typename... Args>
void db(T t, Args... args)      {  cout << t <<" ";db(args...); }
int main() {
     db(1,"a",20,"Hey);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #variable #arguments #function
ADD COMMENT
Topic
Name
6+4 =