• 0 Posts
  • 4 Comments
Joined 1 year ago
cake
Cake day: July 12th, 2023

help-circle
  • TopRamenBinLaden@sh.itjust.workstoProgrammer Humor@lemmy.ml*Permanently Deleted*
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    3
    ·
    edit-2
    1 year ago

    C++ is a superset of C, and C is a subset of C++. C++ was originally designed for the purpose of updating and adding OOP to C.

    The main things C++ has that C doesn’t are user defined data types, support of reference variables, function overloading/overriding, built in exception handling with try/catch, inline functions, and C++ has around 30 more keywords overall.

    I would say the biggest difference is the OOP focus of C++ where all of data and functions are encapsulated into an object. This helps make C++ more secure and better for writing high level implementations than C.