Hello guys! I am new to this forum and would like to start off by saying hello to all of you! I have wanted to start learning C++ for a while now but I have never found a way to get on my feet when programming C++. I need to find a way to learn C++. I have a lot of free time so I can practice a lot. I have a background in programming and I know the very basics. I learn by doing I need to be given exercises and figure out the problems with minimal hints. I don't learn by just reading a book or listening to a lecture I need to be hands on with it and implement what I learned.
I was wondering if any of you know a good way to get started in C++. How did you guys get started? What are your stories? Do you have an links to tutorials that will benefit me? One thing I don't like though is when you follow a tutorial on the internet and you learn something then the next day you find out that what you learned was the wrong way to do it. Well any help would be greatly appreciated. Thank you all for your time.
The most common mistake I see newcomers make is thinking that programming is about the syntax. It's not. It's really, really not. It's being able to understand a problem and think about it in a way that lends itself to a computational answer with the tools available (i.e. solving it in a way that you can then program it). A good place to start on practice problems is Project Euler, which will force you to actually think about how to solve problems.
most beginners find video tutorials easier than books, have a look on youtube for spoonfed c++ tutorials, or buckys c++ tutorials, both are long enough for you to learn the basic core of c++.
@Moschops or anyone else who would like to help. I went to project euler and to problem number 1. I understand that when you become a programmer its not about learning a programming language because anyone can do that its about they way you think. You have to dive into the problem you are faced with looking for a way to get to the answer not the answer itself. You need to be able to think logically and sequentially. The computer and the program is just a tool to help you get to the answer the real work is the journey to the answer. But back to what I need help with. So I was doing the first problem and the problem is Find the sum of all the multiples of 3 and 5 below 1000. So I got out my trusty pad of legal paper and got to work writing out a solution. When I got what I thought would work and I created the program. Here is the code.
Edit: source code deleted to prevent cheating.
I replaced the 1000's with 10's because that was easy enough for me to figure the answer out in my head. The program came up with 23 and so did I so I thought great! So I changed the 10's back to 1000's ran the program and I got 266333 and I thought awesome. So I went to the problem on the website typed in my answer and it said it was incorrect! How can that be when it worked for 10? Any help would be great. Thanks!
For starters, for a very long time his books insisted void main() was fine.
Do a google search - you'll find lots of complaints people have. Unfortunately, his writing style is easy to understand, and since his books are aimed at beginners, they don't realise what they're being taught.
I don't even remember my first book anymore, it was for some high school C++ class I took. I ended up reading the whole book outside of class (the class only made it to chapter 6), but it was a decent book. As far as I remember it wasn't teaching any bad practices, and definitely got me into the language. But I think the sure fire way to learn is to just code, make mistakes, many mistakes, and learn from those mistakes. I've learned more from breaking programs than I have from making solid programs right off the bat. Just recently I was making a renderer(spelling?) and forgot to actually allocate some memory before I called it to be de-allocated. Needless to say, I ran into some odd issues and about crashed my computer.
Hey guys I was wondering if there was a way to compare a number to a whole array? Like if x == somearray So that it compares x to all the values in the array. Thanks!
Thank you guys so much for getting me started! I really want to learn C++ and this is a great start. I will continue more tomorrow and I might need your help again but thank you all!
Also I have completed problems 1 & 2 on project euler. I also am going to delete the source code for problem one above so others can't cheat off of mine.