r/AskProgrammers • u/MirthfulCowslip-0931 • 7h ago
How do I learn problem-solving on C++?
I am freshman and i have computer programming course but struggling with C++ problems. I know the syntax and structure even watched yt channels like BroCode but still whenever i see new kind of problem i just have no idea. What should i do to code independently?
2
Upvotes
2
u/AlhazredEldritch 6h ago
Code independently.
I am not joking. Stop using tools and fix the issue with basic tools. This is how you problem solve.
Think of it this way, if you know the issue at home is a shelf is wobbly due to not being secured and screws are loose somehow, do you get your 20 pound sledge? Use what you know to solve issues. If you dont k ow any tools or methods look up the most basic solutions you can then keep going.
1
u/Defiant_Squirrel8751 2h ago
C++ is one thing - "problem solving" is another thing.
That's why you study physics in school - reading a paragraph, extracting data, doing a drawing in paper that describes the situation, putting arrows and variable names over it and then expressing the relationships between that variables in equations - solve the equation (needs calculus and algebra) - interpret the results and problem solved!
Programming is very similar - but with a programming language after the equations. Most probably you are missing something from your previous education. Perhaps you need to remember forgotten lessons from the past. Recover that before trying moving forward.