Learning C++

Avatar image for dillonwerner
dillonwerner

1617

Forum Posts

3674

Wiki Points

0

Followers

Reviews: 1

User Lists: 1

#1  Edited By dillonwerner

I'm just a normal guy trying to learn C++, anyone know of any good tips, books, or tutorials anywhere that are actually worth investing time into?f Any help is appreciated.

Avatar image for perryvandell
PerryVandell

2223

Forum Posts

1705

Wiki Points

0

Followers

Reviews: 14

User Lists: 8

#2  Edited By PerryVandell

Never forget your semi-colons. EVER.

Avatar image for thekingoftoilets
thekingoftoilets

217

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 2

#3  Edited By thekingoftoilets

Practice your loops. Oh, and depending on the length/complexity of the program you are going to create, it goes a long way to first create a diagram of some sort. This website helped me answer a lot of questions I had when errors popped up or I needed help cultivating my thoughts unto my program. GL man :D.

http://www.cpp-tips.net/

Avatar image for tourgen
tourgen

4568

Forum Posts

645

Wiki Points

0

Followers

Reviews: 4

User Lists: 11

#4  Edited By tourgen

"C++ Primer Plus" isn't bad.

I like http://www.cplusplus.com/ as a reference for the STL containers and the C standard library.

My tip on C++: Just because it's in the language doesn't mean you should be using it.

I would ignore templates, operator & function overloading, and class inheritance when you start. Heresy I know. Everyone grovels at the alter of OOP but it's not all that until you get into large-ish projects. For small projects it's just added typing at the keyboard for 0 gain.

Most hobby stuff can be done just fine with just the basics - standard C functions with some basic C++ classes where it makes sense, and the STL containers & streams. Learn the class inheritance stuff after you've finished a few simple functional projects.

P.S. new & delete are kinda busted so watch out. Also, I'm just a normal guy that has to write some tools at work - so by no means a programming professional. Just some hard-learned lessons over the years.

Avatar image for dillonwerner
dillonwerner

1617

Forum Posts

3674

Wiki Points

0

Followers

Reviews: 1

User Lists: 1

#5  Edited By dillonwerner
@tourgen:  Glad there is two of us, thanks for the tips
Avatar image for benpicko
benpicko

2020

Forum Posts

7

Wiki Points

0

Followers

Reviews: 0

User Lists: 1

#6  Edited By benpicko

Watch thenewbostons C++ tutorials. He's very obviously just reading some C++ book, but he makes it easy to understand.

Avatar image for recharge330
recharge330

86

Forum Posts

472

Wiki Points

0

Followers

Reviews: 0

User Lists: 2

#7  Edited By recharge330

I second C++ Primer Plus, I'm just now finishing it up. Like tourgen said, there is a lot of stuff in C++ and the book covers a lot of it but don't feel like you have to memorize every last thing. Just be aware of what the language is capable of. Two other things I recommend are to try any project that comes to mind and forgetting IDEs for now and just use a basic text editor.

Avatar image for emuleader
EmuLeader

635

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 3

#8  Edited By EmuLeader

@PerryVandell said:

Never forget your semi-colons. EVER.

This, and really make sure all brackets are closed. Nothing is worse than trying to compile a program an seeing the entire screen fill with errors, only to find a bracket was left open. Visual studio is actually a good IDE to use once you get the hang of C++. Makes things alot easier to debug.

Avatar image for radixnegative2
RadixNegative2

547

Forum Posts

60

Wiki Points

0

Followers

Reviews: 0

User Lists: 3

#9  Edited By RadixNegative2
Avatar image for dagbiker
Dagbiker

7057

Forum Posts

1019

Wiki Points

0

Followers

Reviews: 0

User Lists: 16

#10  Edited By Dagbiker

www.gamedev.net

also good luck.

Avatar image for elbon
elbon

400

Forum Posts

30

Wiki Points

0

Followers

Reviews: 0

User Lists: 1

#11  Edited By elbon

Once you get the basic of the language down learn the design patterns

Avatar image for dillonwerner
dillonwerner

1617

Forum Posts

3674

Wiki Points

0

Followers

Reviews: 1

User Lists: 1

#12  Edited By dillonwerner
@ashkanhoss29: I want to be some sort of programmer for a job, and I'm learning C++ because my friends have told me that it is the best  language for programming.
Avatar image for mistasparkle
MistaSparkle

2293

Forum Posts

999

Wiki Points

0

Followers

Reviews: 1

User Lists: 7

#13  Edited By MistaSparkle

@benpicko: Bucky was really great for me, but i wish he would continue his game programming tuts!!!

Avatar image for juanvaldes
juanvaldes

195

Forum Posts

2

Wiki Points

0

Followers

Reviews: 0

User Lists: 2

#14  Edited By juanvaldes

Do you have any programming experience? What is your end goal? Learning for the sake of learning? Want to "make games"? Tool for work? Web apps? Want to make the next Angry Birds?

Honestly going with the assumption that you are starting with step one C++ would not be my first language. Javascript is a quick and easy way to get into programming, learning the basics of logic and control flow and a simple way to "see" the results of your efforts. Other easy to start with language would be scripting languages like PHP, Ruby and Python.

C++ has its place and every serious programmer should learn it at some point along with plain C but it does have many pitfalls that the above mentioned languages do not have. This would free you to learn the basics first before dealing with hardcore memory management. Again it all depends what you want to do.

I will echo the C++ Primer Plus support. No clue what edition it is at now but I still have my copy from high school thats now over a decade old.

Avatar image for radixnegative2
RadixNegative2

547

Forum Posts

60

Wiki Points

0

Followers

Reviews: 0

User Lists: 3

#15  Edited By RadixNegative2

@DillonWerner: Ok cool. I would agree with your friends. I also started with c++ and think it's a great language.

Thinking back what made learning programming for me so difficult was that I would learn about c++ if statements, loops, etc., but never understand how to put the pieces together because I would just blindly follow tutorials. I have come to learn that designing programs is as important as writing them.

It's important to push yourself in your designs so that you learn. If you don't push yourself and just follow tutorials, you'll have a very difficult time learning.

Avatar image for monetarydread
monetarydread

2898

Forum Posts

92

Wiki Points

0

Followers

Reviews: 0

User Lists: 2

#16  Edited By monetarydread

  I am going through this right now. It is a legit course from MIT that does a pretty phenomenal job at introducing you how to think like a programmer.  You learn to to read and write code, the abilities and limits of coding, and to take a description of a problem and map it into something computational.  
 
Edit:  It's focus is on python, but everything I have read about computer science says that python is one of the best to learn with.
Avatar image for tinymothra
TinyMothra

51

Forum Posts

1492

Wiki Points

0

Followers

Reviews: 0

User Lists: 1

#17  Edited By TinyMothra

I would have recommended www.learncpp.com but they seem to be down right now. I've been using them for the past few months and I would highly recommend the site, it's basically like an online textbook with end-of-chapter quizzes and such to help make sure you've learned it. The comments section of each chapter also tends to be very helpful.

Avatar image for ediscool
EdIsCool

1140

Forum Posts

112

Wiki Points

0

Followers

Reviews: 3

User Lists: 2

#18  Edited By EdIsCool

C++ should never be your first language. You will be much happier with the results you achieve when learning the basics if you use c#.

If you want the best balance of making something cool while still learning good coding lessons I would make games using the Unity engine for windows. Its free and you can script with c#.

C++ is the fastest main stream language, it is also a minefield.

Avatar image for zidd
zidd

1940

Forum Posts

2905

Wiki Points

0

Followers

Reviews: 0

User Lists: 24

#19  Edited By zidd

The best tip I can give you is "Always be commenting your code". Theres nothing worse then coming back to something you previously wrote and wasting a bunch of time reading it line by line to figure out what its supposed to do. This goes double while you are learning.

Avatar image for eshchan
eshchan

58

Forum Posts

104

Wiki Points

0

Followers

Reviews: 0

User Lists: 2

#20  Edited By eshchan

Not sure what you want to do with your programming skill. Nowadays c++ is used for game engines and native tablet programming. It's a nice foundation to your programming skill to build on with other language, but know that if you aren't building rage or angry birds you will need to learn other programming language.

Avatar image for warchief
warchief

680

Forum Posts

5

Wiki Points

0

Followers

Reviews: 0

User Lists: 3

#21  Edited By warchief

@DillonWerner said:

I'm just a normal guy trying to learn C++, anyone know of any good tips, books, or tutorials anywhere that are actually worth investing time into?f Any help is appreciated.

Recently I got sick of the work I was doing and decided to find a entry level programming job with a local game developer. Here are some of the things I did to get myself up to speed with C, C# and programming concepts in general.

First off make it fun for yourself, it makes learning things a lot easier, so in that regard:

My first suggestion would be to pick up an Arduino micro controller. The Arduino is a open source micro controller that runs a variant of C on the board. Pick up "Getting Started with Arduion" and run through the examples in this book. The Arduino is a fun way to learn programming, and the book will teach you how to set up programs, use loops and simple logic for the controller.

Other Arduino books:

Practical Arduino

30 Arduino Projects for the Evil Genius

Next you may want to look into the book "Head First Programming" now granted this book uses python to teach you the basics of object oriented programming but its a great way to get more key concepts.

Lastly [and this is where our paths would differ] I read the book "Head First C#" to get an understanding of C# [this is the next leap up from C++] because I deal mainly with web servers.

Hope this helps. Good Luck Have Batman.

Avatar image for theguy
theguy

828

Forum Posts

2

Wiki Points

0

Followers

Reviews: 0

User Lists: 2

#22  Edited By theguy

Comments. All comments all the time.

Avatar image for kashif1
kashif1

1543

Forum Posts

882

Wiki Points

0

Followers

Reviews: 1

User Lists: 1

#23  Edited By kashif1

Try Java instead? Seriously c++ is not a good place to start with programming, learn the basic concepts in something easier such as Java or VB and then if you feel like you need to you can move on to c.

Avatar image for vodun
Vodun

2403

Forum Posts

220

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#24  Edited By Vodun

Play Quake during any C++ class you take. It's what I did and now I work as an interaction designer. Oh, you meant you actually want to learn? No idea!

Avatar image for grumbel
Grumbel

1010

Forum Posts

12

Wiki Points

0

Followers

Reviews: 99

User Lists: 2

#25  Edited By Grumbel

If C++ is your first languages, stop trying to learn it and learn some Python first. C++ really isn't suited as first language and will just lead to frustration as it forces you to learn to many concepts at once. If you already have some experiences with other languages, you could probally pick up the classic "The C++ Programming Language" book and go on from there, but it's really only recommend as a second or third step in the world of programming, not a first.

Avatar image for vanillaplant
VanillaPlant

156

Forum Posts

0

Wiki Points

0

Followers

Reviews: 0

User Lists: 0

#26  Edited By VanillaPlant

@Grumbel said:

If C++ is your first languages, stop trying to learn it and learn some Python first. C++ really isn't suited as first language and will just lead to frustration as it forces you to learn to many concepts at once. If you already have some experiences with other languages, you could probally pick up the classic "The C++ Programming Language" book and go on from there, but it's really only recommend as a second or third step in the world of programming, not a first.

This. In fact, I would suggest you first spend some time with both python and C before C++. You don't need to master these languages, just become comfortable with their syntax and how to preform some basic tasks. Python is a much more approachable language than C++ and is great for learning the fundamentals. Next, learning some C will give you a much better understanding of the low level operations in programming, and much of what you learn in C will translate directly into C++. Also C is sort of the lingua franca in programming because it has been in use for over 30 years; so you should become comfortable with it if you are at all serious about programming.

You can find all the tutorials you need for free online:

Python: http://docs.python.org/tutorial/

C: http://www.cprogramming.com/tutorial/c/lesson1.html

If you want a book, then get: http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628/ref=sr_1_1?ie=UTF8&qid=1317746831&sr=8-1 It is THE book for learning C and is also great for reference.