Message from C, C++ discussions

December 2019

— Well, yes, but actually no, rather how to make the same function in a different file that is, in a way, a library of functions that more or less do the same thing

Message permanent page


You will, indeed, run into that very problem, which I advise to solve using the very solution you know is tiresome. Sadly, C is more of a syntactic sugar on top of assembly code than a proper programming language

— So do I just open the file, copy paste the function in the main program and call it a day? that's how I've been dealing with it

Message permanent page

— In C, you need to write both a header file (contains the definitions of the functions and types) and an implementation file. The header generally have a .h extension and the implementation a .c extension

Message permanent page

— Mmm when I get home I'll read about this more, our teacher didn't get there yet and I'm new to C

— The declaration of a function in C89 is at least the return type of the function followed by its name and parentheses. In C99, the type of the parameters is also required, separated by commas, within the parentheses

Message permanent page

— Functions and types declarations (struct, typedef, enum) are statements and hence terminated by a semicolon

Message permanent page

— Take care of yourself more

— I do

— Hey guys I want to rewrite my game engine an Im thinking about to use C# instead of C++ because the development itself is much faster - do you think my games will have much less fps?

Message permanent page

— Definitly

— Https://