I recently started learning C++. I'm enjoying it and look forward to making stuff with it. I know that the future will be hard and I'll need ALOT of patience. I have learned a little bit about Java a while back to make mods for minecraft but it just lost my interest. So is there any tips you guys would give me for a starter in C++. Any resources would be appreciated too.
Thanks
In general, if you wish to make a game (as it's usual for programmers to do at some point), don't do a 3D one. Start with 2D.
If you make a program or game, finish it. Cut on the features if necessary (sometimes, ideas and knowledge of how to apply those ideas doesn't go hand in hand), but finish it.
Make sure to look at the documentation if you need to understand something. Doing so while looking at the code of others can be good practice, albeit hard.
Rollback Post to RevisionRollBack
"If you aren't ashamed of what you coded 6 months ago, you aren't progressing as much as you should." - My Website : Altar-Apps,Applications, Libraries, APIs, Code snippets and the Heart of Sin roguelike game!
As already suggested, books are your best friend here.
After the introductory Hello World programs, come up with a few ideas for programs to make on your own. Debug your programs yourself, and until you reach an impassable wall, don't ask for help. At the early stages, don't worry about optimization. Worry about understanding what you're doing. You'll learn in time about time complexity and the optimal way of doing things.
Easy programs to start with are simple calculators. Include different formulas or shortcuts for math problems you do in schoolwork or something similar.
Don't use char* or strlen/strcmp/memcpy. Use string.
Don't use C arrays (like int foo[42]; ). Use vector.
map and unordered_map are incredibly useful.
There's a whole chapter about pointers in that tutorial you've been reading. You can skip all that.
"You're telling me I can use pointers?"
"No, Neo. I'm trying to tell you that, when you're ready, you won't have to."
Instead, use iterators, shared_ptr, and unique_ptr. But only when you really need them.
Now it doesn't really hurt to learn these things anyway, but only so you can understand other people's code.
In my opinion: I would personally suggest not listening to anything this guy said.
If you make a program or game, finish it. Cut on the features if necessary (sometimes, ideas and knowledge of how to apply those ideas doesn't go hand in hand), but finish it.
This is some of the best advice that i have seen. If something doesn't go right the first time, don't give up. Try to debug it and get it working. Not only will you learn a lot more that way, you will also feel a lot better than if you quit.
Rollback Post to RevisionRollBack
There are 10 types of people in the world. Those who understand binary notation, those who don't, and those who think this is in binary.
Not to repeat what others have said....
But even professional developers usually have 'reference books' handy.
(A 'reference book' is actually a particular kind of programming book for programmers who don't need the tutorials.... You can think of it like 'a dictionary for programmers'. )
Even if you've been programming in the same language for 10 years, you still normally won't "remember everything you need".... Unless you just have a really good memory.
And as Sillen also said... Learning lots of libraries is also handy. It's especially useful in C++, because knowing the available libraries (and not writing your own every time) is what will keep your development time low and your productivity high.
In other higher languages learning libraries isn't quite as important as for C++, but still incredibly useful... but in C++ it is basically a necessity to be able to use a few libraries.
Thanks
Thinking about coming a mod to simply not moderate.
Seriously, it will stick with you so much more in a physical paper book form than it will as text on a monitor.
If you make a program or game, finish it. Cut on the features if necessary (sometimes, ideas and knowledge of how to apply those ideas doesn't go hand in hand), but finish it.
Make sure to look at the documentation if you need to understand something. Doing so while looking at the code of others can be good practice, albeit hard.
- My Website : Altar-Apps, Applications, Libraries, APIs, Code snippets and the Heart of Sin roguelike game!
After the introductory Hello World programs, come up with a few ideas for programs to make on your own. Debug your programs yourself, and until you reach an impassable wall, don't ask for help. At the early stages, don't worry about optimization. Worry about understanding what you're doing. You'll learn in time about time complexity and the optimal way of doing things.
Easy programs to start with are simple calculators. Include different formulas or shortcuts for math problems you do in schoolwork or something similar.
"Programmers never repeat themselves. They loop."
In my opinion: I would personally suggest not listening to anything this guy said.
This is some of the best advice that i have seen. If something doesn't go right the first time, don't give up. Try to debug it and get it working. Not only will you learn a lot more that way, you will also feel a lot better than if you quit.
"Programmers never repeat themselves. They loop."
But even professional developers usually have 'reference books' handy.
(A 'reference book' is actually a particular kind of programming book for programmers who don't need the tutorials.... You can think of it like 'a dictionary for programmers'. )
Even if you've been programming in the same language for 10 years, you still normally won't "remember everything you need".... Unless you just have a really good memory.
And as Sillen also said... Learning lots of libraries is also handy. It's especially useful in C++, because knowing the available libraries (and not writing your own every time) is what will keep your development time low and your productivity high.
In other higher languages learning libraries isn't quite as important as for C++, but still incredibly useful... but in C++ it is basically a necessity to be able to use a few libraries.