Void

Void

Sergey Abbakumov

In C there is a feature: functions without parameters

void Foo();


in fact can take any number of arguments

Foo();
Foo(1);
Foo(1, 2);


The compiler, however, can issue a warning, but this is not critical. Unlike C++, where this is considered an error.


If, in C, you declare a function as

void Foo(void);



then, just as in C++, Foo calls with arguments will produce a compilation error.


Telegram channel: https://t.me/sea_plus_plus

Report Page