C++ Projects for Practice

This is a topic dedicated to fellow students to show and get feedback on their mini projects after they have finished the course. The best experience is a hands-on experience. Any criticism is welcomed here.

1 Like

And here is my first project in C++

Here I have made small notebook program in the console that allow you to create a note, give it ID number and priority level. You can complete/delete the task, you can edit the task, you can review list of tasks.
Please do give any feedback you desire since it is my first mini project.

2 Likes

Did you create all of this with just the knowledge you got from the C++ course in this academy? I am looking through all your code and honestly I feel like after taking this course, i understand maybe 30% of what is going on there at best. I’ve never coded anything before, the only exposure i’ve had to programming of any kind is the javascript and C++ courses in this academy. I’m at that point where i need to try to write something of my own and to be honest i’m pretty lost about how to even start.

I would suggest you try cloning a project and begin by changing or adding some functionalities to get the hang of it. :slight_smile:

So I opened up this project and I’m trying to analyze it. I’m having a hard time understanding why certain variables/constructors/functions are declared in “headers” vs “sources”, and the overall reasoning for laying things out in the way they are laid out here. For example, I don’t get why there is a tasks.h as well as a TaskClass.h, and why one of them is under an “include” folder, whereas the other is right under headers. Is there any tutorial you would recommend regarding the actual organizational nature of writing a program?

Maybe he used some IDE that created these folders, I can’t be certain. Program structure is more of a design choice of a developer than a rule. You don’t need to worry about it to much. With more experience you will get the feeling where you want to put parts of your code or you can follow a convention of some open source project. To get a better hang of it.

As for header files, these were historically more important due to memory restrictions of the time and helped compilers to save on memory while compiling the code. These days are more used to abstract the class methods to make it more readable to the developer, particularly in larger projects, but are not required to be able to write code.

I am not aware of any particular tutorial about organizational nature of a program but you can check online for some generic structures how a C++ program is structured. One I found for example:
https://hiltmon.com/blog/2013/07/03/a-simple-c-plus-plus-project-structure/

A better option would be to find an open source project on Gitlab, try to compile it and make some changes. A lot of projects have a Good first issue tag that lets newcomers get started like Bitcoin core:
https://github.com/bitcoin/bitcoin/labels/good%20first%20issue

hmm ok i will check those links out, thanks a bunch for this comprehensive answer!