From owner-freebsd-questions@FreeBSD.ORG Mon Nov 10 18:38:08 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 81A1616A4CE for ; Mon, 10 Nov 2003 18:38:08 -0800 (PST) Received: from hotmail.com (law9-f42.law9.hotmail.com [64.4.9.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id E925B43FB1 for ; Mon, 10 Nov 2003 18:38:07 -0800 (PST) (envelope-from exhausted01@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Mon, 10 Nov 2003 18:38:07 -0800 Received: from 209.42.38.167 by lw9fd.law9.hotmail.msn.com with HTTP; Tue, 11 Nov 2003 02:38:06 GMT X-Originating-IP: [209.42.38.167] X-Originating-Email: [exhausted01@hotmail.com] From: "yo _" To: alexkelly@adelphia.net Date: Mon, 10 Nov 2003 21:38:06 -0500 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 11 Nov 2003 02:38:07.0512 (UTC) FILETIME=[D6E03180:01C3A7FC] cc: freebsd-questions@freebsd.org Subject: Re: Another Newbie Question: C or C++ X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Nov 2003 02:38:08 -0000 >>I need to buy a book on C or C++ to help me in FreeBSD. Which would be >>better to buy? If you just want to start programming in FreeBSD, Learn C as well as you can. The route I took was learning basic programming skills then reading "The C Programming Language" by K&R, it's an excellent book if you are already very familiar with the computer and have some basic programming skills (make sure you know your c development enviroment and how to use gcc). The book is so great because not only does it teach C syntax, the examples open your mind to writing simple and efficient code in a C style, and it even has a small UNIX programming tutorial toward the end (on how to implement some of the standard library functions in a UNIX system). That book and a good familiarity with the man pages is really all you need to get started coding on FreeBSD. If you are still a little lost and really want to go on the quick route to good BSD programming, read "UNIX Network Programming" by W. Richard Stevens. The original edition introduces you to good fundamental knowledge of the UNIX system and archictecture (process model, system calls, and IPC) then it goes right to socket programming which is a must to know especially in this day and age. The later editions seperate the actual socket programming from the unix stuff but go intensely in depth. That's why i'm fonder of the first edition, concise and smart. >> >>I first thought a book on C would be best, because the OS is written in C. >>But, now I'm not sure because I read that gcc can compile C++ too (so, I'm >>assuming C++ must get used too). Now that you've had good practice with C and UNIX programming, learning libraries (GTK, QT, pthreads, GD to name a few) is simply a matter of reference and learning any other language else is simply a matter of syntax and style, and everything will come very easy. If you haven't learned C++ by that point just figure out what Object Oriented programming is (it'll beautify your life), get a reference book, look at some coding examples, and no sweat. Java? Perl? Python? Javascript? Visual Basic (haha)? They'll all just be minor changes in syntax and style when in comes to C/C++ (except for python, hah). Hope that helps and good luck! -Rian Hunter _________________________________________________________________ MSN Messenger with backgrounds, emoticons and more. http://www.msnmessenger-download.com/tracking/cdp_customize