The #define
was useless, not the declaration of a MIDI interface.
You'll need some experience, which you get from reading a book or following a course about programming in C++, and by doing simple practice problems and projects. Writing a sequencer from scratch is not something I would recommend as a first project.