Does anyone have any tips on how to get better at C++ programming? I have a basic at best knowledge of C++ but find myslef lost in my second semester C++ programming class. Are there any resources that I can use or projects that I can work on that will help develope my skills?

Recommended Answers

All 6 Replies

What specifically are you lost with? Is it the syntax that is confusing or are you confused by concepts? Objects? Algorithms?

Do you have experience with any other programming languages or is this your second semester in the world of programming, and its more the concepts that are confusing?

One of the ways that I've found useful, is doing programming challenges online(HackerRank,Project Euler,CodeWars, etc.). Any challenge that requires concepts that you're not familiar with you can learn about them and apply them(there are numerous sources online: cplusplus.com,cppreference.com, etc.). As you complete each challenge, many of these sites, will let you browse through code the others have done. This is also a good way to learn about different approaches and techniques.

commented: Thanks you for your input! I will definitely give those websites a try! I feel like if i can actually practice the concepts I will learn faster! +0
commented: I've been programming professionally with C++ for 25 years. I still keep my browser open to cplusplus.com for reference. +14

You can also apply what you know towards something you enjoy. Like books? Make a simple program that interfaces with a database that allows you to put info in.

It doesn't matter if your program is useful to anyone other than you, or if it even succeeds - it's the process of identifying a problem, and working a solution out to meet your needs. From there you can work on things like optimizing, or implementing new features, or expanding your understanding of things like data transport or threading, objects, or anything else...

All it starts with is figuring out something you are interested in, and coming up with a simple idea that you want to figure out how to do. That's pretty much programming in a nut shell - be interested. Be curious. Want to understand how things work, and then have the patience to research it. The code to interface with the machine will come naturally once you start working on "something."

I do mostly web work professionally - I spend a majority of my day in Javascript/SQL and a bit of CSS, and I get to use C++ every so often. However, once in a while something comes up that I have to solve that can be done in other languages due to libraries already built, or just because the syntax is easier to get started, and then I get to learn C# or Python. Just find something you want to do, and do it. If you truly want to program, and do it professionally, nothing should stop you from just diving in and getting to work simply because you want to know if you can, and how it works.

You could always go to Rosetta Code. That link will take you to the C++ page with a list of problems with sample code. You could look at the problem definition (there are a large number of problems), try to code up a solution, then refer to the given solution to compare with your own.

Dani,

I am having trouble actually comprehending the syntax, for some reason I also have trouble applying what we are learning in our text book to the problems that we are assigned. This is my second semester in any kind of programmin class, so I am a complete noob and guess you could say its the concepts that confuse me. I would greatly appreciate any tips and advice! This is a field I really want to work in and I know I wont learn a programming language over night but would appreciate any help! On a side note, are there any websites with practice problems so that I can practice c++?

I am having trouble actually comprehending the syntax, for some reason I also have trouble applying what we are learning in our text book to the problems that we are assigned.

Class::attributes::methods. For classes, think about things, like cars, animals, etc. For attributes, think about the things that make up those classes, like (for cars) wheels, motor, brakes, seats, transmission, etc. For methods, think about the actions your class can respond to. Again to the car analogy: int shiftGear(int what_gear = 0 / 0 == neutral /) virtual; Getting into virtual methods is another subject, but you need to be aware of them.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.