csev / cc4e

C Programming for Everybody
https://www.cc4e.com/
Other
292 stars 92 forks source link

From Python to C - The Rosetta Stone Lecture (cc_02_10.c) #84

Closed edmspjp closed 7 months ago

edmspjp commented 7 months ago

Declaring a C function as you present is not supported anymore. int mymult( a, b) int a, b; { ... } “must” be: int mymult( int a, int b) { ... }

From my Mac cc I got the following "warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x"

csev commented 7 months ago

You are quite correct - the goal for my course is not to teach modern C syntax but instead to emulate C as it was in 1978.