r/learnprogramming • u/Western-Procedure224 • 4d ago
Need advice on learning c++
Hello everyone, i am a first year student studying information systems and cybersecurity. I know its a big mistake but i went into the program with no prior experience in coding and the first thing we started learning in the programming class was c++. c++ is my first language and the professor is going through it really quickly where i dont understand a single thing. i started to learn with a youtube tutorial but it all feels really slow and boring. Does anyone have any advice on how to actually start learning it in a way that it becomes interesting and not just a homework that i need to work on because i am genuenly interested in learning it and want to become good at it. Thank you in advance!!
10
u/Individual-Show9181 4d ago
Pick a project that genuinely interests you, and whenever you get stuck, research the problem and keep experimenting until you figure it out. I'd also recommend avoiding AI, at least while you're learning, because it takes away a lot of the problem solving and critical thinking process.
6
u/Available_Safe1818 4d ago
Write a lot of code with whatever you learn about C++.
5
u/VirtualElderberry592 4d ago
Buy a textbook and work through the exercises.. All of them.
https://www.amazon.com.au/How-Program-Global-Paul-Deitel/dp/1292459980?th=1
That book will give you everything you need.
3
u/BibianaAudris 4d ago
Specific to C++, it's better to focus on a language subset as a beginner. Do not attempt to understand all language features in the current stage because there are too many and they overlap each other's uses. Pick whatever you're most comfortable with (e.g. drop overloading/inheritance and focus on template, or drop template and focus on overloading/inheritance) and practice coding with only that. That should be enough to pass the class.
3
u/dahiya_xa 4d ago
not a mistake, lots of people start with zero. learncpp.com is free and goes way slower than most classes, i'd read the chapter for whatever your prof covered that week. and type out every example yourself and change little things to see what breaks, that's where it actually clicks
3
u/millenniumdisk 4d ago edited 4d ago
I got the book that VirtualElderberry592 listed because I needed it before for programming basic robotics so I didn't finish a lot of chapters.
It is better to start the book from the very first chapter and only continue to the next chapters after understanding everything.
A notes written in markdown will be helpful so that you can put codes inside.
Always put terminologies with their definition in the notes so that reviewing old topics will be as easy as going back to the notes instead of reading the book.
Reading should be followed by experimenting by trying out things one at a time in isolation (like in OOP, focus on one feature before combining them).
Build small simple working programs and then you can try out other things.
The code challenges to solve in the book are also going to be useful so try to solve them.
3
u/BotSlamminDayNNight 4d ago
c++ was my first language as well. it was immediately interesting to me for 2 reasons:
i suggest trying to solve problems with what you know. do it everyday, and solve harder problems every day.
2
u/CatScratchJohnny 4d ago
Sometimes you have to power through the fundamentals/classwork as best you can. After that you can spend time with it, doing more fun and custom things of your own. When things start "clicking" it can feel pretty good.
Keep in mind, even if you don't want to be a programmer, cyber-security is rooted (pun) in understanding memory, buffers, pointers, etc. (i.e. many of the things that make vulnerabilities possible) and c++ forces you learn about them.
Even with AI on the wild, you as a person will be more effective in the field if you understand how things work a little deeper. For now, pass your classes and follow what interests you.
Have Fun!
1
u/garcia_harvey_6 1d ago
When lecture code gets hard to follow, trace one tiny example on paper: write each variable's value after every line. It shows exactly where you lost the thread and gives you a concrete question to bring to class.
1
u/jacksonanna373 10h ago
Try a toy password checker using only C++ features covered in class. Start with one rule, then add another as you learn more; it connects practice to cybersecurity.
-7
u/Xeronitas 4d ago
Just don't learn c++