C++ objects are messier than I thought. When it comes to objects, whatever tutorial you’re using, it’ll always cover the “header files”.

Their contents:

  • Headers contain class declarations
  • C++ files keep the implementations

How it works:

  • The preprocessor “paste” the class declaration into the c++ file, which later will be compiled into an object.
  • With the linker, whatever file that’s using a class knows where to look.



is the pic cheesy enough?

Why separate the declarations and their implementations? It’s for better code management.

Writing a blog post is harder than I imagined — Me.