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.
Learning C++
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/
"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.
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.
@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.
Are you learning programming or just c++? Do you know how to program in any other languages?
Either way I highly recommend http://www.cplusplus.com/
Edit: Here's the tutorial section (it can be kind of hard to find): http://www.cplusplus.com/doc/tutorial/
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.
@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.
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.
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.
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.
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.
@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:
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.
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.
@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.
Please Log In to post.
Log in to comment