What language is the most difficult to compile and why ? (except natural ones)

Member Avatar
Member Avatar
+0 forum 1

I have interesting question. Why this code is legal in C, but not legal in C++ ? (tested with GCC 4.2 compilers) [CODE=C] void Function() {} int main () { Function(1); return 0; } [/CODE] We can simulate same C++ compiler error in C compiler by changing function definition to [ICODE]void Function(void) {}[/ICODE] So seems that if function is declared without parameters- C++ automatically substitutes VOID as parameter in function declaration, and C - does not. The only question here is - Does that difference between C & C++ is documented / official ? Because I've not seen that difference …

Member Avatar
Member Avatar
+0 forum 2

The End.