Tekforums

Chat => Entertainment & Technology => Topic started by: Mongoose on November 28, 2006, 12:44:30 PM

Title: C/C++ programming books
Post by: Mongoose on November 28, 2006, 12:44:30 PM
I have a good working knowledge of BASIC (yeah I know) and MATLAB (powerful but sooooo slowwwww, not to mention pricey). Back in my first year of Undergrad I did a course in C which was pretty simple but I got on well with it.

I would like to brush up and improve my knowledge of C programming to a level where I can actually write useful programs with it. My Dad is always asking me to make little scripts for him for land surveying which I would like to be able to do in compiled C rather than tokenised JustBASIC as I do at the moment.

Can anyone suggest some good reference/teach yourself type books in C and/or C++? Ive never found computer languages to be difficult, I just need a place to start from.
Title: Re:C/C++ programming books
Post by: Shakey on November 28, 2006, 13:15:09 PM
I recently got the C++ for dummies 7-in-1 desk reference, its huge! But its also very good, the learning curve is probably about right for you.

It even had a couple of sections at the end dealing with MFC and .NET should you ever need them.

Here it is (http://www.amazon.co.uk/All-one-Desk-Reference-Dummies/dp/0764517953/sr=8-4/qid=1164719655/ref=sr_1_4/026-2091071-4244414?ie=UTF8&s=books)
Title: C/C++ programming books
Post by: cornet on November 28, 2006, 13:27:21 PM
I can highly recommend the following books they will teach you real programming rather than the dummies books which ive generally found horrible and in some cases, plain wrong!

Depending on how much you know then  The C Programming Book (http://www.amazon.co.uk/C-Programming-Language-2nd/dp/0131103628/) might be worth investing in.

If you know the basics and want to get down to some real stuff then by far the best book is
Pointers On C (http://www.amazon.co.uk/Pointers-C-Kenneth-Reek/dp/0673999866/). Learning Pointers and Memory management properly is necessary and really isnt that difficult. Even if you go on to use Java then understanding these 2 topics will means you will
understand what is going on. (Oh and amazon is so not the cheapest place to buy this book ;) )

No matter what programming languge you learn, everyone should have a copy of The Practice of Programming (http://www.amazon.co.uk/Practice-Programming-Professional-Computing/dp/020161586X/). This book just makes sense and covers a number of topics including programming style and data structures.

Personally I wouldnt bother with C++ until you understand C.

Cornet
Title: Re:C/C++ programming books
Post by: Mark on November 28, 2006, 15:52:07 PM
I never could understand why people reckon learning the non OO language then going OO is easier. Even the creator of c++ reckons you should start with c++

http://www.research.att.com/~bs/learn.html

I started with C because it was part of my job with microcontrollers, but I dont feel it offered me any advantage in learning c++. Granted most stuff does translate over fairly easier with a few changes (cout etc)


Title: Re:C/C++ programming books
Post by: BigSoy on November 28, 2006, 16:33:53 PM
Personally Id learn what youll find most powerful and get the most use out of - and in an everyday sense thats C++ - Id learn that for the 9/10 occasions when it will do the job, and pick up the odd bits of C if and when you find C++ limiting.

Title: Re:C/C++ programming books
Post by: TRB on November 28, 2006, 21:09:52 PM
Thinking in C++ (http://mindview.net/Books/TICPP/ThinkingInCPP2e.html) is great for learning C++, plus the author has the books available to download for free.
Title: Re:C/C++ programming books
Post by: cornet on November 29, 2006, 22:42:38 PM
Quote from: MarkI never could understand why people reckon learning the non OO language then going OO is easier. Even the creator of c++ reckons you should start with c++

LOL best comment Ive heard all day :) I bet Bill Gates says that you should learn Windows before Linux or OS X... ;)

Seriously thou. Ive read the article and it makes some good points...

However I guess it depends on what you want to do.

If you really want to learn how to program well and work towards coding larger projects that are easy to maintain and scale well, then starting with C will give you a much better understanding.

It will force you to think a bit more about whats going on and make you understand programming fundamentals (memory management, pointers, etc...)

I have worked with programmers that all they know is Java, conseqently their code ends up in a complete mess and suffers from fundamental flaws.
You can always tell a code that knows C, as they generally dont suffer from the above.


Moving on, if all you want to do is write some small programs and have a bit of fun with no real intention of taking it too seriously then I still wouldnt touch C++.

** Enter Ruby stage left **
Rather than ramble on any more ill just leave you with some code to read, your task is to work out what it does. Hopefully youll realise why Ruby rocks :)

See here for answers ;)


5.times { print "Hello World!" }



exit unless "tekforms".include? "tek"



[toast, cheese, wine].each { |food| print food.capitalize }



Cornet
Title: Re:C/C++ programming books
Post by: Beaker on November 30, 2006, 00:01:01 AM
QuoteStroustrup ran to the head monk, exclaiming, "Master! I have added object-orientation to the C programming language! I have been enlightened!" to which the head monk responded by hitting him on the head with a stick.

though i prefer :
Quote from: Bjarne StroustrupC makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg.

Title: Re:C/C++ programming books
Post by: Mongoose on November 30, 2006, 12:33:27 PM
wow great, thanks for all the tips guys.

For now al I am after is the ability to write some simple programs which I would like to use but which dont seem to exist, or if they do then cost way more than their usefulness is worth.

In the future I might end up using this ability for work though so I hope to learn to do it properly and in a language potential employers might be interested in, hence wanting to move away from BASIC even though JustBASIC is actually powerful enough for most of my needs.

I think I will take Cornets advice and start out by expanding my knowledge of C
Title: Re:C/C++ programming books
Post by: ERU on December 04, 2006, 17:54:37 PM
Ok youve convinced me. Just ordered the following:
C++ All-in-one Desk Reference for Dummies.
&
Anyone Can Do It: Building Coffee Republic From Our Kitchen Table: 57 Real-life laws on entrepreneurship.

Might get some of the ones linked above too but ill see how i get on first :)