There are a lot of similar questions to this one, but specifically to a question like mine, I didn’t quite find the answer.
How to make a function with a variable number of arguments of one specific type? Let it be char. That is, so that it can be called with any number of arguments, but so that they all must be char. Otherwise, an error at compile time. So is it possible to do?
foo(char, char, char); //---Можно! foo(char); //--Можно! foo(char, char, int) //--Нельзя, ошибка на этапе компиляции foo() //==По-хорошему, тоже надо бы запретить, но не это главное
Foo('a', -12345678)? "Read" - just about, read the question first. - PinkTux