learning C++

C++ is an amazing language, so powerful. The thing is, I'm having a hard time learning it, i dont know if its my learning style or what, but i keep getting stuck and giving up. I really want to learn it, its just when i get into arrays and things more complex than beginner level I get stuck and give up.

Does anyone have any tips, or learning methods, or even online courses they could recommend I try? I REALLY want to learn this. Im good with microsoft office and have created a few complex spreadsheets etc and want to broaden my horizons to making ACTUAL working programs, not just close imitations in a spreadsheet.

Thanks guys,

i really really appreciate this

Anthony
closed account (z05DSL3A)
brucey2343 wrote:
its just when i get into arrays and things more complex than beginner level I get stuck and give up.
First, if you get stuck,don't be afraid to come here and ask questions. Second don give up...ask more questions. :-)

Does anyone have any tips, or learning methods, or even online courses they could recommend I try?
What have you tried so far? My usual recommendation would be to get a book and work your way through it.

For the beginner I would say take look at "Programming: Principles and Practice Using C++" [Bjarne Stroustrup]. As the name suggest it is aim towards programming rather than the language. What ever book (or course or whatever) you choose, do all the exercises even if you think 'yes I understand that, I can skip them' , practice helps lock it into your subconscious so you don't have to think about it.

Final piece of advice; When you get stuck (you will ... always), stop and have a break, go for a walk, have a drink, practice your carpet putting (Golf), do something other than get frustrated with your current problem for a few minutes. When you return to it you will often see a solution more quickly.
so far i have watched video courses, and read pdf books, but something about reading books on a computer just makes me tired.

ive just ordered 2 of Sams teach yourself c++ books (24 hours and 21 days), the 2nd edition C++ and the C++ reference (both by bjarne), so at least now i have physical copies i can actually highlight and bookmark :)

hopefully should help


The thing is, my boss wants me to make him a simple event logging program, and he said hed wait for me to learn the language but obviously id like it done asap as theres a big paycheck :)
look up coding made easy on youtube. he has some good tutorials
Getting stuck at certain stages while learning c++ is absolutely Normal, i remember when i was still learning the language, took me 2 whole years to just get the basics, i kept giving up every time i run into arrays & multidimensional arrays, i used to get so so overwhelmed, but somehow i managed to pull myself through. anyway, all i'm trying to say is that there's nothing really wrong with your learning style, it's just programming, really confusing sometimes, so what i did was i bought a book "Beginning c++ through game programming" definitely recommend it if you're looking to write your own games, or "Jumping into c++" both are really good, they explain things very well you can't go wrong with them, you can download their PDF for free and take a look yourself before buying any of them, also, look up 'TheNewBoston' on youtube, he has a c++ tutorial series, he's easily the best c++ teacher on youtube, if there's anything that you didn't quite understand while reading, look him up, he helped me a lot.
... my boss wants me to make him a simple event logging program, ...


This sounds interesting, when I think of event logging I think of Nagios which is nothing like simple. What is it you are trying to monitor?

You could probably get a quick prototype cranked out with VBS and it wouldn't be a total waste because the COM model1 looks more or less the same in both formats.


1: Yes I know this is a tautology, but calling it "The COM" sounds freaking stupid.
C++ is a hard language. There is no doubt about this but just as you said it's a powerful language. Know that it will take time just to get the basics especially if you've never programmed before. A couple macros and spreadsheet formula plug n chugs are still not really equivalent to real programming (no discouragement intended).
Unlike some programming languages your not going to have the most mainstream built-in library support for event driven programming, such as the Swing library in Java with its actionListener objects. This means that after you've learned this language you WILL have to learn a 3rd party library that will enable you to do these extra things, especially if you want something like GUI support.
My advice -- know that this will take time. Get a good book, I heard c++ primer is good though I personally used c++ primer plus (don't recommend it for the frustrations of typos). Do as many of the exercises as possible, type out as many examples as possible, and asks questions in the beginner forum as needed.
Good luck and have fun.
Im trying to monitor events, as we run security on some big festivals, so things like putting people out, searching, gates open and close, fatalities etc. So if i learn C++ i HAVE to learn a 3rd party library, whats that?
A 3rd party library extends the language, allowing for scope above what standard C++ allows. Used in conjunction with C++, the correct 3rd party library can allow you to do anything that can be done on a computer. You do however, have to learn C++ and the library.

A famous library example that you will see on these forums is SFML http://www.sfml-dev.org/. SFML gives you the ability to do media in C++, drawing, animating and playing sounds.

To use a C++ library, you must first install it. This can be a pain, but there are tutorials out there for how to install most libraries and if you get really stuck you can ask on here for help. Then, follow the documentation of the library and learn how to use it, or at least, learn how to use what you need from it. In the case of SFML, you may only want to draw an image and therefore would not need to learn parts of the library that deal with sound, for example.

You will not need to worry about libraries until you have become comfortable with C++ though. By then, you will be a better program and they will seem more simple than they will appear to you now. ;)

So if i learn C++ i HAVE to learn a 3rd party library,


This is not necessarily true. I wrote a program for my boss just yesterday that didn't need a single 3rd party library. It really does depend on exactly what you are trying to do and if that is possible in standard C++ or not.
Last edited on
closed account (Dy7SLyTq)
A 3rd party library extends the language, allowing for scope above what standard C++ allows
this is nitpicky, but important to know the difference of ie i knew what you meant, but you said it wrong. sfml, boost, sdl is all standard c/c++. what it does is allow you to use well developed techniques to write better code, ie it does a lot of the "heavy lifting for you". however it is standard c/c++ and not making any additions to the compiler
I thought for a beginner, it wasn't important to explain in such detail.
Can someone make me a program for this.


Write a program called ShapeCalculators that does the following:

a. Asks the user for the base and height of a triangle
b. Asks the user for the height and width of a rectangle
c. Asks the user for the radius of a circle
d. Outputs the area of each shape in the following format:

Shape Area
Triangle ###.##...
Rectangle ###.##...
Circle ###.##...

Note: Use the fraction 22/7 to approximate pi.
PI:3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862
803482534211706798214808651
Last edited on
Topic archived. No new replies allowed.