Sign in to follow this  
Gink

Question about C++

Recommended Posts

SDL is written to be usable with C. Therefore, you can skip anything in C++ and not C:
classes, templates, STL, exceptions, namespaces...

You will have to learn functions, pointers, and structs.

The more C++ you learn, however, the easier your job will be...

Share this post


Link to post
Share on other sites
To be honest i think your trying to jump the gun especially if this is going to be your first programming language. If that is the case C++ is not particularly good beginners language in anycase. Its not a language to be taken lightly either it will take you about 2 years to really know it even then i'm serious that one book just isn't enough. All at the same time you need to learn general programming concepts and design by practicing with making console apps, at some point algorithms and data structures.

Sure you don't need to use all features of C++ but consider this those gaps of knowledge you leave out will most likely mean you'll end up doing something like reinventing the wheel to only turn to be a flat tire, at least know whats available from the language.

If your really going skip sections then i would advice you at the very least don't skip learning abit about how to use the C++ standard library (containers & generic algorithms, utilities, I/O streams etc), be aware of whats available in it it will save you in the long run trust me.

Share this post


Link to post
Share on other sites
I concur with the above. You should at least browse through all of the sections, so that when you come back for help, the terms are at least not completely new. You'll be saving yourself tons of time later if you learn the entirety of the book now, rather than developing bad habits now, and unlearning them as you learn the "advanced" topics later.

Share this post


Link to post
Share on other sites
Silly forums decided it would be fun to log me out *gets out the forum-beating stick* [grin]. See the AP above. This is my post:


1000 page book!? Woah.

First job - I think you should probably get a shorter book for a nice introduction (I don't know what book you have, but 1000 pages seems to be overkill).

(Point 1.a - It may be a good idea to learn an eaiser language first - it's not strictly necessay, it's up to you. BASIC may suffice. Just don't try to learn C before C++. Bad plan and waste of time.)


Second - These are things you can safely skip to begin with. You will be touching on many of these as you use libraries, but for your own code it's not strictly necessary that you be able to implement things that use these features. Learn these, but you can safely learn them last.

- Templates
- Multiple Inheritance
- Namespaces
- Function Pointers
- Operator overloading (at least, the complicated stuff)
- Const correctness
- Keywords like inline, friend, mutable, volatile, typename, and even more obscure ones I can't list off the top of my head


Here is a list of stuff that you will find is highly important (although wait until you've done basic functions and arithmatic and so on; ie "hello world"):

- Classes and structs
- Inheritance (the basics) and virtual functions
- Pointers and references
- Standard library stuff (try to use C++ standard library over C stuff where possible)
- std::string, std::vector and std::list in particular.


To complement your book, here is a website I like. You will find others too. [link].

C++ is not an easy language to learn (as snk_kid says - 2 years or more for an "ok" understanding), but once you know it, it is very rewarding. Good luck.

Share this post


Link to post
Share on other sites
Quote:
Original post by Andrew Russell
To complement your book, here is a website I like. You will find others too. [link].


And hidden within there, after a recent update, is a link here, which I can personally recommend after skimming through it the other day.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this