View Single Post
Old 08 June 2020, 13:42   #19
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,317
my game is a mix between C and C++. But it came from a SDL version I did for Windows / Nintendo DS a while ago. C++ compiler can compile C all right except for some very rare incompatibilities

(1) it encourages more efficient programming

=> MAME went from C to C++. You don't have to use "new" at every line in C++. Allocate your objects in the init phase, then use them. There's almost no extra overhead with C++ if you do that properly.

(2) we'll both learn a bunch

=> True: you'll learn that you should never have chosen C

(3) there are more resources available for C.

=> That you can compile in C++ too, or compile in c and add a "extern c" directive on the C++ side (my C++ code calls phx asm replay module without any issues)

Hey that's your project, but if you want to do some OO programming, don't let that 3 reasons deter you.
jotd is offline  
 
Page generated in 0.04365 seconds with 10 queries