Re: Books on C

camlorn wrote:

Unless you have a pressing reason to learn C specifically, don't.  C++ is more complex but better, if only because it now provides limited automatic memory management.  Unless you have a pressing reason to learn C++ specifically or are already a very good programmer, also don't.  That said:
The C book from 1975 is drastically outdated.  Back then, you couldn't compile its examples on a different compiler, let alone 40 years of standardization, improvements, development, etc.  Not only won't the programs compile, but updating them will be hard.  This situation is now better, in that all the major platforms implement at least C++ 03.  Most of them have implementations of C++11 (which introduced smart pointers, the limited form of automatic memory management I swear by), but C++11 is too new to find many "I'm new to C++" resources that show you its f eatures.  The reason I and a lot of other C++11 programmers know the new features is because we are far along enough to need them, though I can make a very good argument that shared_ptr is something that new programmers should be shown immediately.  If you are on an embedded platform, you will be lucky to have C99/C++98, so I'm not going to waste time waxing poetical about C++11 until I know that you have it.  It would also be helpful to know your programming experience and background before I try to help past this post.
The two main references these days seem to be http://www.cplusplus.com and http://www.cppreference.com. Both offer links to tutorials if you poke around.  Your best bet is to Google for tutorials, imho.  If you're dead set on a book, this SO answer gives a lot of them.
Here's a direct link to a tutorial that appears to be pretty decent: http://www.cplusplus.com/doc/tutorial/
I'm having trouble finding anything that doesn't assume you already know how to program.  If this is a problem, I'm afraid I can't help.  The work I do in C/C++ these days often requires consulting the standard when I need something new; that's the only reference for the most advanced features and guarantees, and consulting it is a sign that you're probably doing something dangerous (so when I do, I immediately consider redesign possibilities).  I know it too well to pull a bunch of good learning tutorials out of my hat, basically.
C is an incredibly simple language, at the cost of having to manage literally every allocation and deallocation, having no automatic cleanup (you can get far with preprocessor magic, but I'm not even going to try t o explain how I pulled off those tricks without a full blog article), having no encapsulation that you don't make yourself (no equivalent of BGT's classes, and all I'm going to say is enjoy implementing vtables), etc.  C++ gives you object oriented features and a good standard library, This latter point is arguable, but having sets, vectors, maps, hashtables, and the algorithm header is a godsend as compared to C.  In C everyone writes their own version of all the standard data structures from scratch.  My last point is this: C++ is a monster that you tame, not a programming language that you learn.
I'll help further if I can.  Specific questions would be helpful.

Camlorn, can you stop going into depth about your opinions? Just debrief us on your opinion and leave it at that. I don't see what's so great about C++. IMHO, its a lot harder to use, and its very bloated. Also, not very many compilers support C++11/C++14. Plus, how would you know if you could or couldn't compile The C Programming Language's first edition examples? Have you tried it? If you've read it somewhere, don't believe it; verify it. How would you know if I was lying if I said I was 30 years old? I'm not, but still. What if I set my age somewhere else and set my age to 30 years ago (1984)? BTW, you probably could've compiled those examples around 1983, around the time microsoft began development of windows. Remember, in 1976, compilers didn't exist. Hell, we didn't have a clear vision of what binary was. All we had were little punch cards that you inserted into a machine and hoped you got your code right. That's really all we ahd. Well, along with empire building sized computers that filled up an entire room. Some of those were so power needy that one of them dimmed an entire section of lights in one of the states. I forget which one. So, again, keep your in-dept opinion s to yourself, and state them in simple, one or two liners.
As for books, I recommend Practical C Programming. It goes in depth of what everything does and how it works, and I really like it.

_______________________________________________
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Development room : king gamer222 via Audiogames-reflector
    • ... AudioGames . net Forum — Development room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Development room : Sebby via Audiogames-reflector
    • ... AudioGames . net Forum — Development room : Ethin via Audiogames-reflector
    • ... AudioGames . net Forum — Development room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Development room : king gamer222 via Audiogames-reflector
    • ... AudioGames . net Forum — Development room : king gamer222 via Audiogames-reflector
    • ... AudioGames . net Forum — Development room : Ethin via Audiogames-reflector
    • ... AudioGames . net Forum — Development room : Sebby via Audiogames-reflector
    • ... AudioGames . net Forum — Development room : king gamer222 via Audiogames-reflector
    • ... AudioGames . net Forum — Development room : camlorn via Audiogames-reflector
    • ... AudioGames . net Forum — Development room : Sebby via Audiogames-reflector
    • ... AudioGames . net Forum — Development room : king gamer222 via Audiogames-reflector

Reply via email to