I'm currently working on a variadic function using template, however, I keep getting the same error:
C2780: 'void print(T,Types...)': expects 2 arguments - 0 provided
even if it is the simplest one:
template <typename T, typename... Types>
void print(T var1, Types... var2)
{
cout << var1 << endl;
print(var2...);
}
int main() {
print(1, 2, 3);
}
the same error again. I wonder what's wrong.