Help navigating Github repositories for C++ projects

I apologize for such a noob question…

I have taken the two C++ courses here on Codecademy. I decided that I would go look through some C++ code repositories over at GitHub to see if I could even begin to understand what was going on.

However, after opening about a dozen different repositories, I had trouble finding the int main () function and initial #include declarations in any of them. In fact, I often had trouble finding any *.cpp files at all.

I browsed several of the trending C++ projects from the last month. They are here:

Here are a few I attempted to look through:

Clearly, I know I’m still a baby coder, but I feel that if I’ve taken the two Codecademy C++ courses, I should at least be able to find the int main () function on these projects along with some of the initial #include declarations. But I can’t.

Hi!

C++ is very hard. Notoriously so. I’ve seen beginner seminars aimed for people that have been coding in C++ for up to 3 years. So in a way, it’s kind of hard to go from 2 courses to being able to digest production code.

Two things to look out for are src and make. src usually hold the source code while the makefile is a special file that is used to build the entire project from all the resources presented in it (good chance of finding something like a main.cpp there). Reading and writing makefiles is also not easy, so don’t be alarmed.

Here’s a makefile for one:
notepad-plus-plus/makefile at master · notepad-plus-plus/notepad-plus-plus · GitHub which I found thanks to the readme here: notepad-plus-plus/scintilla at master · notepad-plus-plus/notepad-plus-plus · GitHub.

Executables are not the only thing you can build in C++. You can also build libraries. So for example if you read the readme here: GitHub - google/mediapipe: Cross-platform, customizable ML solutions for live and streaming media. you’ll see that it’s some sort of library that once install you can use in your own C++ source code (or iOS/Android in this specific case).

As a final note I’ll say that I’m finishing up a degree where C++ is the main language and we are not taught these techniques either as well. Maybe the professor provides a very simple makefile but that’s the most we deal with. So it’s totally possible (and probable) to get a lot of people who can write decent algorithms in C++ without knowing how to navigate the complexities of C++ in the wild (at least at first).

1 Like

Thank you so much! Helpful and encouraging. I appreciate it.

1 Like