looking for book with sample code

This is a discussion on looking for book with sample code within the C++ Programming forums, part of the General Programming Boards category; Hi. I'm new to programming and i'm looking for a book that has alot of sample code (more than the ...

  1. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    1

    Question looking for book with sample code

    Hi. I'm new to programming and i'm looking for a book that has alot of sample code (more than the usual textbooks)- is there anything out there like that? Also, are there any good books to read (i've heard of the cathedral and the bazaar, hackers: heroes of..)? thank you.

  2. #2
    Pursuing knowledge confuted's Avatar
    Join Date
    Jun 2002
    Posts
    1,916
    Sample code is useless if you don't know what it does. For your first book, it would be a better choice to get something with good explanations and very simple code. Really, it's a lot better. There was just a book thread, look here:
    Best book for C++

    Evidently there are also 58617861789148 other threads about it too. (Some reports claim that there are only 98798787, but they are of dubious quality)
    Away.

  3. #3
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398

    If you're looking for "real programs"...

    Most authors are going to keep the examples short. If you were teaching english, you would use single words and simple phrases. Once you know the words and phrases, you can understand, or write longer writings.

    Maybe that's a weak analogy, because programs don't flow linearly like good writing... Typically, you can't simply read-through code and understand what it's doing without a fair amount of thinking... maybe flow-charting... research, etc.

    The author might use a flow-chart to show how a larger project is programmed. Or, I have a BASIC language book that builds one large program by adding code as you progress through the book.

    Some of the more advanced topic-specific books come with a CD with the source code for complete programs. For example, I have a couple of Digital Signal Processing books, and a couple of Driver books that have overwhelming amounts of code on the CDs.

    "Programming Windows" by Charles Petzold has several example programs that are a few pages long. But, these too are simple (for windows programs)... they just demonstrate the particular topic of discussion.

    I don't know what you're finding in the usual textbooks. If I remember correctly, "Teach Yourself C++ in 21 Days" by Jesse Liberty has examples that are typically one page of code. The programs at the end of each "week" are a few pages long.

    If you really want to overload your brain, look-up some of the open-source projects on the web. You'll find plenty of real-world code examples... without any tutorial explainations though.

  4. #4
    Registered User Daniel's Avatar
    Join Date
    Jan 2003
    Posts
    47
    If your looking for source code you can go to www.pscode.com. this site has plenty of code and also some great free tutorials.
    C++ Homepage: http://darkeldar77.tripod.com/cpp.html

  5. #5
    Registered User
    Join Date
    Jun 2003
    Posts
    85
    Hey,

    I find Leen Ammeraal's "C++ for Programmers -- Third Edition" a good book (ISBN: 0-471-60697-9). Having said this, you must be careful when you pick Ammeraal's books. They are usually quite advanced for beginners (This one is not however!). Nevertheless, he has also posted his examples on his site which might be what you are looking for:
    http://home.planet.nl/~ammeraal/cppbook.html

    cheers,
    Ben
    p.s. on the other hand i dont know if spending money and time on buying computer books is such a good idea after all with all the resources available on the net!
    Medical Robotics: "Pursuing perfection in healthcare through innovations in robotics and information technologies for medicine and surgery."

  6. #6
    Registered User
    Join Date
    Nov 2002
    Posts
    1,109
    Originally posted by Ben_Robotics

    p.s. on the other hand i dont know if spending money and time on buying computer books is such a good idea after all with all the resources available on the net!
    Some people do prefer having a book instead of a browser, open. But you do bring up a good point.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Pre-Interviewer asking sample code
    By jayee_spicyguy in forum C Programming
    Replies: 3
    Last Post: 02-09-2009, 10:21 AM
  2. Quick help on bool or while? Sample code...
    By Striph in forum C Programming
    Replies: 5
    Last Post: 01-12-2006, 03:05 PM
  3. True ASM vs. Fake ASM ????
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 04-02-2003, 03:28 AM
  4. stricmp() where can I view the sample code?
    By Unregistered in forum C Programming
    Replies: 5
    Last Post: 06-28-2002, 08:40 AM
  5. Interface Question
    By smog890 in forum C Programming
    Replies: 11
    Last Post: 06-03-2002, 05:06 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21