r/learnprogramming • u/Western-Procedure224 • 11d 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!!
11
u/Individual-Show9181 11d 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.
7
u/Available_Safe1818 11d ago
Write a lot of code with whatever you learn about C++.
5
u/VirtualElderberry592 11d 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 11d 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 11d 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/BotSlamminDayNNight 10d 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 11d 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 8d 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 6d 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.
1
u/Both_Bend_2481 5d ago
Google for tutorials and stuff that aren't videos, ffs. Videos are the slowest medium.
1
u/BurnIncarnate 5d ago
read an interview book. reading it backwards can help.
-7
u/Xeronitas 11d ago
Just don't learn c++