Jump to content

Help with learning C++ (Basic C experience)

I am currently in my second year of college and enrolled in a C++ Data Structures class, which focuses on object based programming. I took (and passed) C programming but always had a hard time programming for labs and had to have others help me with the code. I am now in the position where I am almost nearly reliant on a few friends to create the coding for homework, which showed on my first test grade. My problem is that I don't like how the teacher teaches, she reads off from a slideshow and talks about everything like I know what I am doing. I never learned how to even set up my compiler and had to figure out how to link files together and stuff. The fact I am not learning much shows me that I need a different way of learning the material.

 

If anyone has suggestions of better ways to learn C++ basically from the start and work my way up to creating programs with multiple classes, inheritance, and general practice, I would love to learn the language. Thanks. (Also I can't get below a C in the class).

The Grey Squirrel

CPU: i7-6700k @ 4.8GHz - CPU Cooler: Be Quiet! Dark Rock 3 - Motherboard: ASUS Z170-E - GPU:  ASUS GTX 1060 DUAL

Case: Inwin 303 - RAM: 4x8GB Corsair LPX Storage: 2x Samsung 850 EVO 500GB - PSU: EVGA SuperNOVA G2 550W

Mouse: Logitech G502 Wired / Bungee Keyboard: Corsair Strafe Cherry MX Red Headphone: Sony MDR- 1R

Microphone:  Blue Yeti - Webcam: Logitech C920 - Monitors: 3x Dell S2415H 

Link to comment
https://linustechtips.com/topic/675095-help-with-learning-c-basic-c-experience/
Share on other sites

Link to post
Share on other sites

The C standard library is present in C++, which can be used to your advantage, though C++ has some things that could be used over the C-equivalent for nicer code and better performance. Smart pointers, vectors, and classes can help with object-oriented programming, for example, though you should never feel you have to use everything from C++.

 

There are numerous websites that are dedicated to helping you on these subjects, like http://www.learncpp.com/ . Another way to learn things is from example, as there are tons of C++ projects on github.com, though keep in mind the only quality control is that of the person who wrote the code, so there might be some things you should avoid doing (i.e. using new and then free() instead of delete). There's also https://www.lynda.com/ which has video tutorials, though it isn't free.

Link to post
Share on other sites

Do you have a compiler?

 

Visual Studio is the go to for windows programming but they phased out the windows form application for C++ in favor of C#.

 

Otherwise is you can try to do things in cygwin first.  It provides a fairly simple Bash shell for easy command line interface programming.

Link to post
Share on other sites

3 minutes ago, xentropa said:

Do you have a compiler?

 

Visual Studio is the go to for windows programming but they phased out the windows form application for C++ in favor of C#.

 

Otherwise is you can try to do things in cygwin first.  It provides a fairly simple Bash shell for easy command line interface programming.

 

own Visual Studio 2013, which works rather good. I'm thinking that I need to start off with more basic projects then what I am given for homework assignments. 

 

17 minutes ago, Kavawuvi said:

The C standard library is present in C++, which can be used to your advantage, though C++ has some things that could be used over the C-equivalent for nicer code and better performance. Smart pointers, vectors, and classes can help with object-oriented programming, for example, though you should never feel you have to use everything from C++.

 

There are numerous websites that are dedicated to helping you on these subjects, like http://www.learncpp.com/ . Another way to learn things is from example, as there are tons of C++ projects on github.com, though keep in mind the only quality control is that of the person who wrote the code, so there might be some things you should avoid doing (i.e. using new and then free() instead of delete). There's also https://www.lynda.com/ which has video tutorials, though it isn't free.

 

I also think the class is hard because we don't currently have access the the STD functions and classes, she makes us create our own classes. I'll check out that website for now and possibly look at lynda (using offer code whatever linus gives us)

The Grey Squirrel

CPU: i7-6700k @ 4.8GHz - CPU Cooler: Be Quiet! Dark Rock 3 - Motherboard: ASUS Z170-E - GPU:  ASUS GTX 1060 DUAL

Case: Inwin 303 - RAM: 4x8GB Corsair LPX Storage: 2x Samsung 850 EVO 500GB - PSU: EVGA SuperNOVA G2 550W

Mouse: Logitech G502 Wired / Bungee Keyboard: Corsair Strafe Cherry MX Red Headphone: Sony MDR- 1R

Microphone:  Blue Yeti - Webcam: Logitech C920 - Monitors: 3x Dell S2415H 

Link to post
Share on other sites

10 minutes ago, Dubesta11 said:

 

own Visual Studio 2013, which works rather good. I'm thinking that I need to start off with more basic projects then what I am given for homework assignments. 

 

 

I also think the class is hard because we don't currently have access the the STD functions and classes, she makes us create our own classes. I'll check out that website for now and possibly look at lynda (using offer code whatever linus gives us)

 

If you are looking for the most basic type of programming, then command line interface would probably be it.  You would type the code using notepad++, then use a command prompt like window for your input and output.

 

Windows command prompt can't compile, so you might need cygwin.

Link to post
Share on other sites

Can you post your syllabus, if its anything like mine hopefully i can help.

When i did data structures the hardest part was algorithms (games tech taught us c++ well).
Can i ask if you messed with memory allocation in your c unit (i didn't play with memory till second year)?

For OOP look around on thenewboston his channel is awesome for learning (if you have the time)


 

Last bit of advice i can give, remember to new and free memory. (Play toy stories strange things)

 

Best of luck,
(pardon any stupidity 2am post)

Link to post
Share on other sites

YouTube, YouTube, YouTube.

 

Seriously, everything you could want to learn about coding can be found there.

Software Engineer for Suncorp (Australia), Computer Tech Enthusiast, Miami University Graduate, Nerd

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×