home *** CD-ROM | disk | FTP | other *** search
/ ftp.pasteur.org/FAQ/ / ftp-pasteur-org-FAQ.zip / FAQ / C-faq / learn < prev    next >
Encoding:
Text File  |  2000-11-07  |  40.1 KB  |  911 lines

  1. Path: senator-bedfellow.mit.edu!dreaderd!not-for-mail
  2. Message-ID: <C-faq/learn_973504065@rtfm.mit.edu>
  3. Supersedes: <C-faq/learn_970824110@rtfm.mit.edu>
  4. Expires: 20 Dec 2000 09:47:45 GMT
  5. X-Last-Updated: 1999/08/26
  6. Organization: none
  7. From: Sunil Rao <sunil.rao@ic.ac.uk>
  8. Newsgroups: alt.comp.lang.learn.c-c++,comp.lang.c,comp.lang.c++,comp.lang.c.moderated,alt.answers,comp.answers,news.answers
  9. Followup-To: poster
  10. Approved: news-answers-request@MIT.EDU
  11. Organisation: ISE @ ic.ac.uk
  12. Subject: [alt.comp.lang.learn.c-c++] - FAQ list
  13. Summary: This post contains useful information for anyone wishing to
  14.           learn C and C++, listing online tutorials and resources,
  15.           giving book recommendations and helping clear some common
  16.           misconceptions.
  17.  
  18. Originator: faqserv@penguin-lust.MIT.EDU
  19. Date: 06 Nov 2000 09:49:59 GMT
  20. Lines: 887
  21. NNTP-Posting-Host: penguin-lust.mit.edu
  22. X-Trace: dreaderd 973504199 5711 18.181.0.29
  23. Xref: senator-bedfellow.mit.edu alt.comp.lang.learn.c-c++:67556 comp.lang.c:460439 comp.lang.c++:514152 comp.lang.c.moderated:17039 alt.answers:52234 comp.answers:43028 news.answers:195539
  24.  
  25. Archive-name: C-faq/learn
  26. Posting-Frequency: monthly
  27. Last-modified: 23 August 1999
  28. URL: http://www.raos.demon.co.uk/acllc-c++/faq.html
  29.  
  30. This document is a FAQ list for the newsgroup alt.comp.lang.learn.c-c++.
  31. It provides readers with a framework and a set of guidelines for posting
  32. here, in addition to answering a number of questions newcomers here tend
  33. to ask.
  34.  
  35. This FAQ is meant to be read in its entirety. It is posted monthly to
  36. alt.comp.lang.learn.c-c++, comp.lang.c, comp.lang.c++, 
  37. comp.lang.c.moderated, comp.answers, alt.answers and news.answers.
  38.  
  39. This is the plaintext version of this list. An HTML version can be
  40. located at
  41.  http://www.raos.demon.co.uk/acllc-c++/faq.html
  42.  
  43.  
  44. Compiled by Sunil Rao <sunil.rao@ic.ac.uk>.
  45. Comments, suggestions, corrections, constructive criticism and requests
  46.  for clarification will be gratefully acknowledged.
  47.  
  48.  
  49. Last update: 23 August 1999
  50.  
  51. Last changes made: Updated and expanded the answers to questions 6,
  52.  10, 15, 16, 17, 18 and 19.
  53. To do list: To add answers to a number of questions and to update
  54.  information regarding compilers.
  55.  
  56.  
  57.  
  58. Special Thanks to...
  59.  Dennis Swanson, Jim Gewin, Billy Chambless, Mark Brown, Dave Dunfield,
  60.  Jack Klein, Steve Summit, Steve Clamage, Dennis Ritchie, Kaz Kylheku,
  61.  Lars Hecking, Pablo Halpern, Jerry Coffin, Stuart Hall, Dann Corbit,
  62.  Michael McGoldrick, Cameron Foster, Brody Hurst, Jabari Adisa,
  63.  Wieland Stⁿbinger, Chris Newton and Bernd Luevelsmeyer
  64. for their helpful comments, suggestions, advice, corrections and
  65. constructive criticism, and (in the case of some) for permitting me to
  66. quote from their papers/posts.
  67.  
  68.  
  69.  
  70. 1: What is the purpose of this newsgroup?
  71.  
  72.     alt.comp.lang.learn.c-c++ is an unmoderated newsgroup for the
  73.     discussion of issues that concern novice and non-expert programmers
  74.     in C and C++ who wish to *LEARN* more about one or both of these
  75.     languages.
  76.  
  77.     That probably looks scary. Basically, anybody can post to the
  78.     group. Provided the questions you post are on-topic and the answers
  79.     you provide are accurate, you should not have a problem. If your
  80.     question is off-topic, you will typically be redirected to a
  81.     newsgroup that is more appropriate; if your answers are
  82.     inaccurate, you risk being corrected with a flame.
  83.  
  84.  
  85. 2: What is C/C++?
  86.  
  87.     First of all, C and C++ are different languages. C was created by
  88.     Dennis Ritchie as an efficient language for systems programming.
  89.     Bjarne Stroustrup then extended C by adding features to support
  90.     object-oriented programming. C++ can be considered to be a
  91.     superset of C, but there are real differences between them.
  92.  
  93.     It can usually (though not always) be assumed that anybody who
  94.     talks about "C/C++" as one language is no expert - this extends
  95.     to book authors too. It is normally unclear whether somebody is
  96.     referring to "C OR C++" or "C AND C++" when using this expression,
  97.     so it is probably best avoided.
  98.  
  99.  
  100. 3: So, are C and C++ not so similar after all?
  101.  
  102.     They are indeed similar to a great extent. Incompatibilities do
  103.     exist, though, and many idiomatic constructs used in C are frowned
  104.     upon by C++ experts. C++ programmers generally consider code that
  105.     does not exploit those features of C++ that make it possible to
  106.     write better programs - programs that are more readable and easier
  107.     to write and maintain - to be in poor style. The differences
  108.     between the two languages are significant enough to ensure that
  109.     one has to be clear about the language being used. However, it
  110.     must not be forgotten that C++ is a largely a superset of C, and
  111.     that it is possible (though perhaps not desirable) to write code
  112.     that works correctly in both languages.
  113.  
  114.     A lot of people incorrectly believe that object-oriented
  115.     programs cannot be written in C; this is not true. What is true
  116.     is that C++ provides features that make it easier to write in a
  117.     style that is object-oriented; in other words, C++ supports
  118.     programming in an object-oriented style.
  119.  
  120.  
  121. 4: What is the difference between this newsgroup and comp.lang.c or
  122. comp.lang.c++?
  123.  
  124.     This newsgroup is primarily intended for discussion related to the
  125.     LEARNING of C and C++. The other two groups are primarily intended
  126.     for discussion of the features of the respective languages
  127.     themselves. Naturally, some overlap does occur. This group does tend
  128.     to be slightly (perhaps excessively so) more informal, though. Most
  129.     regulars on this group show great patience with many common
  130.     beginners' questions and will willingly expound on many topics of
  131.     interest or particular difficulty, referring to appropriate
  132.     reference material, either in printed or in electronic form, as
  133.     necessary.
  134.  
  135.  
  136. 5: What kind of questions may be asked here?
  137.  
  138.     Any question relating to any aspect of C or C++ that you're having
  139.     trouble understanding is on topic here. By C, what is meant is the
  140.     language PROPER and its standard library as defined by ANSI and ISO.
  141.     C++ discussions are about the proposed language standard (that
  142.     recently passed its formal vote) and the library it defines. Any
  143.     questions relating to specific compilers, third-party or non-
  144.     standard libraries, compiler extensions etc are unwelcome here, and
  145.     will probably be answered with a redirection to a more appropriate
  146.     newsgroup.
  147.  
  148.     If you've been thus redirected, do not get miffed or upset and post
  149.     an angry response - it will cut no ice with the regulars and will
  150.     only label you as an unwilling learner. What's discussed in this
  151.     group is rigidly defined to limit the traffic and make the group
  152.     useful to as wide a possible audience as possible.
  153.  
  154.  
  155. 6: I have a burning question about XXX. What should I do first?
  156.  
  157.     First of all, do check to see if your question has not been been
  158.     answered before. Look up any of the standard references on the
  159.     language. If you can't find the answer, browse the group, lurk here
  160.     for a few days, search the archives at Deja.com, read the relevant
  161.     FAQs (including those of comp.lang.c and comp.lang.c++), and if you
  162.     STILL can't find the answer, post by all means.
  163.  
  164.     Note that you might not be the first ever learner to have run into
  165.     your problems. There is a good chance that your question has been
  166.     answered before.
  167.  
  168.      Deja.com: http://www.deja.com/
  169.      C FAQ:    http://www.eskimo.com/~scs/C-faq/top.html
  170.      C++ FAQ:  http://www.cerfnet.com/~mpcline/c++-faq-lite/
  171.  
  172.  
  173. 7: What other points should I make note of BEFORE posting here?
  174.  
  175.      Please observe basic Netiquette guidelines. If you're not sure of
  176.      what these are, subscribe to news.announce.newusers, and read *ALL*
  177.      of the posts there. A good reference is
  178.        http://www.ezine.com/netiquette.html
  179.  
  180.      To summarise these points very briefly - ensure that your post is
  181.      on topic. Do your homework before posting. Don't post the same
  182.      question one hundred times. Don't troll. Don't post homework
  183.      questions without anything to show your effort. Don't ask for
  184.      replies to be sent by email. Don't post binaries. Make sure that
  185.      your subject line is an accurate description of the problem/topic.
  186.  
  187.      Please do not ask for replies by email. If you haven't got the time
  188.      or patience to read the newsgroup, that's tough. The answers you
  189.      receive might benefit other readers of the newsgroup as well, and
  190.      you yourself might learn more from the discussions your question
  191.      might generate.
  192.  
  193.      If you have to reply, be accurate and precise - your reply is being
  194.      read by LEARNERS, remember. If you are unsure or have nothing new
  195.      to add, don't bother.
  196.  
  197.      For heaven's sake, don't get abusive when you are corrected or
  198.      redirected. If you are unsure as to why you have been redirected,
  199.      ask the person who did so *PRIVATELY* by email. There usually is
  200.      a good reason - see question 9.
  201.  
  202.      Do not take any answers on trust. Sadly, many of those who post
  203.      answers here know even less than the interested learner who posted
  204.      the original question. Wait for a few days before relying on any
  205.      posted code or answers, just in case they might be corrected by
  206.      others. This is also why it is a very bad idea to email your
  207.      questions directly to regulars; you have no insurance against
  208.      any potential mistakes - remember that nobody is infallible.
  209.  
  210.      Please do not make any MIME or UUENCODED posts (this includes
  211.      HTML). Many newsreaders cannot handle such posts correctly. You
  212.      will only make it impossible for many to read your posts.
  213.  
  214.      And please try not to flame. This is a learners' group. Not
  215.      everyone who posts here is aware of all the issues involved. A
  216.      grumpy attitude only makes things difficult for everyone
  217.      concerned.
  218.  
  219.      It usually helps if you indicate in somewhere in your post if
  220.      you're expecting a C or a C++ answer - several techniques
  221.      appropriate to C++ will not work in C, and some C programs will
  222.      not work or are considered bad style under C++. It also makes it
  223.      easier for other readers - they can then safely ignore your post
  224.      if they cannot help you with it. If you're not sure as to which
  225.      language you're learning, you probably need to get better
  226.      resources to learn from.
  227.  
  228.  
  229. 8: I posted a homework question, but got no help; only sarcastic
  230. responses. Why?
  231.      
  232.      Homework questions are in general not welcome here - most attempts
  233.      to disguise one usually do not work particularly well. You will
  234.      typically receive no help unless you can demonstrate that you have
  235.      made an honest attempt to solve the problem yourself, by posting
  236.      some code you have trouble with, for instance.
  237.  
  238.      There is little point in a regular supplying you with code to
  239.      fulfil an assignment if you are going to pass the course and come
  240.      out and work on real-world projects without knowing how to even
  241.      tackle a basic homework problem. See also
  242.       http://home.att.net/~jackklein/ctips01.html#homework
  243.       http://members.xoom.com/jshiva/hw.txt
  244.  
  245.  
  246. 9: Why are questions relating to Windows, Graphics, Sockets etc. off-
  247. topic here?
  248.  
  249.      Questions on these topics come up every so often here. C and C++
  250.      are languages, not operating systems. They come with limited,
  251.      though highly useful, standard libraries. While any question
  252.      relating to these libraries is relevant and most certainly on
  253.      topic, a question relating to MFCs, for instance, is of absolutely
  254.      no interest to a Unix expert, and vice-versa. There exist
  255.      newsgroups DEVOTED to these non-standard additions. It certainly
  256.      makes more sense to post a question in a place where there is a
  257.      greater chance of it being answered, and answered correctly. As
  258.      a beginner, it probably makes more sense to concentrate on the
  259.      core language itself and master that before branching off to
  260.      learn system-specific tricks.
  261.  
  262.      See also http://members.xoom.com/jshiva/offtopic.txt
  263.  
  264.  
  265. 10: What are some other related groups where I might post questions?
  266.  
  267.      (Answer adapted from the regular "Welcome to comp.lang.c" post
  268.      by Billy Chambless and Tim Behrendsen)
  269.  
  270.      You *really* ought to be able to work out where to post by
  271.      yourself. Please, please, please, for heavens' sake read the
  272.      FAQs and lurk for a while before posting your questions.
  273.  
  274.      Please do not post to more groups than are necessary. Think
  275.      carefully about the relevance of your post before you post to any
  276.      of the newsgroups mentioned below. If you decide that your question
  277.      is indeed relevant to more than one newsgroup and is not a FAQ,
  278.      please cross-post rather than multi-post. Remember that many
  279.      regular readers of this newsgroup also follow several of the other
  280.      groups mentioned below.
  281.  
  282.      Note: if your news server does not carry the borland, microsoft or
  283.      watcom newsgroups, you might find it necessary to connect
  284.      to forums.borland.com, msnews.microsoft.com or forums.sybase.com
  285.      instead. See also
  286.       http://www.borland.com/newsgroups/
  287.       http://sdn.sybase.com/sdn/appdev/newsgroups.stm
  288.  
  289.      * Language Issues
  290.  
  291.       C                         comp.lang.c, comp.lang.c.moderated
  292.       C++                       comp.lang.c++.moderated, comp.lang.c++
  293.       x86 assembly              comp.lang.asm.x86
  294.  
  295.      * Non-language-specific Issues
  296.  
  297.       Algorithms                comp.programming
  298.       Graphics                  comp.graphics.algorithms
  299.  
  300.       Another avenue worth exploring for general algorithms questions
  301.       might be the bulletin board at the Analysis of Algorithms
  302.       homepage based at http://pauillac.inria.fr/algo/AofA/ and
  303.       mirrored at http://www.cecm.sfu.ca/mirror/INRIA/algo/AofA/.
  304.  
  305.       There is a real difference between an algorithm and an
  306.       implementation thereof. A question regarding an algorithm itself
  307.       is, strictly speaking, off-topic though issues do get raised here
  308.       in the absence of any good newsgroup to discuss them in.
  309.       Questions relating to implementations are of course on-topic
  310.       here.
  311.  
  312.      * Compilers/Libraries
  313.  
  314.       The gcc compiler          gnu.gcc
  315.       DJGPP (gcc for DOS)       comp.os.msdos.djgpp
  316.       Borland C++               borland.public.cpp
  317.                                 borland.public.cpp.language
  318.       Borland C++Builder        borland.public.cppbuilder
  319.                                 borland.public.cppbuilder.language
  320.       Visual C++                microsoft.public.vc.ide_general
  321.                                 microsoft.public.vc.language
  322.       Watcom C/C++              powersoft.public.watcom_c_c++.general
  323.       CodeWarrior               comp.sys.mac.programmer.codewarrior
  324.  
  325.       MFC                       microsoft.public.vc.mfc
  326.                                 comp.os.ms-windows.programmer.tools.mfc
  327.       OWL                       borland.public.cpp.owl
  328.                                 comp.os.ms-windows.programmer.tools.owl
  329.       VCL                       borland.public.cppbuilder.vcl
  330.  
  331.      * Operating Systems/System Specifics
  332.  
  333.       DOS issues                comp.os.msdos.programmer
  334.       MS Windows                comp.os.ms-windows.programmer.misc
  335.                                 microsoft.public.win16.programmer.*
  336.                                 microsoft.public.win32.programmer.*
  337.       OS/2                      comp.os.os2.programmer.misc
  338.       Macintosh                 comp.sys.mac.programmer.misc
  339.       General UNIX              comp.unix.programmer
  340.       Amiga                     comp.sys.amiga.programmer
  341.  
  342.  
  343. 11: HELP! My program does not work correctly. What do I do now?
  344.  
  345.      Before posting code here, try and make sure that it at least
  346.      compiles correctly, even if it does not quite behave the way you
  347.      intended it to. Try and localise your error to a particular
  348.      function or section of code - most readers have no time to wade
  349.      through pages of code (If you are unable to do this, you probably
  350.      need to start again from scratch anyway.). Do NOT under any
  351.      circumstances post all of your code as an attachment - many will
  352.      simply ignore your post. Please also specify if your code is C
  353.      or C++.
  354.      
  355.      Essentially, post the smallest complete program that manifests the
  356.      problem. This makes it easier for the reader to answer your
  357.      question. You might find that doing this enables you to answer
  358.      your question yourself!
  359.  
  360.      Read the answer to the above question as well. And do learn how to
  361.      use the debugger that came with your compiler. It usually helps if
  362.      you set the warning levels to the highest possible for your
  363.      compiler - let the compiler pick out any errors and warn you of
  364.      any potential problems. And if you post any errors or warning
  365.      messages with your code, it makes it that much easier for a
  366.      regular to see what's wrong with your code - any need to compile
  367.      it yet again will be minimised, especially if the error is a
  368.      common one.
  369.  
  370.  
  371. 12: What online tutorials exist for learning C and C++?
  372.  
  373.      The best online tutorial for C I have come across has got to be
  374.      Steve Summit's class notes for the C courses he teaches.
  375.       http://www.eskimo.com/~scs/cclass/cclass.html
  376.  
  377.      There are references to other C tutorials in his C FAQ as well.
  378.  
  379.      Vinit Carpenter maintains a list of resources for learning C
  380.      and C++. Do note, however, that a fair number of the tutorials
  381.      placed online contain mistakes and/or are out of date.
  382.       http://www.cyberdiem.com/vin/learn.html
  383.  
  384.      Ted Jensen's tutorial on pointers and arrays in C can be found
  385.      at http://pweb.netcom.com/~tjensen/ptr/cpoint.htm
  386.  
  387.      Tom Torfs has written an excellent, complete tutorial, meant
  388.      to complement a good introduction to C. It's not primarily
  389.      intended for the complete beginner to the language, though.
  390.       http://members.xoom.com/tomtorfs/cintro.html      
  391.  
  392.      See also the answer to question 18.
  393.       
  394.  
  395. 13: What should I look for when picking a book to learn from?
  396.  
  397.      Opinions vary widely. Most readers recommend the book(s) they
  398.      learnt from, regardless of whether or not they might actually be
  399.      suitable for the learner. The fact that many commonly recommended
  400.      books are either full of errors or hopelessly out of date (or
  401.      even both!) makes matters worse.
  402.  
  403.      Beware of books that claim to teach you both C and C++ - they might
  404.      end up teaching you a horrible hybrid instead. It is also probably
  405.      better to stick to books that conform to the C and C++ standards,
  406.      at least while beginning. Many compiler-specific books do not go
  407.      into sufficient depth regarding important language issues and
  408.      usually fail to be clear as to whether something is specific to the
  409.      compiler under consideration or not.
  410.  
  411.      Some texts come bundled with compilers - it's usually worth
  412.      checking to see how out-of-date the compiler actually is. For C,
  413.      this is probably less of an issue than it is for C++, simply
  414.      because compiler writers have had over a decade to catch up with
  415.      the standard.
  416.  
  417.      It pays to keep more than one good book handy; many books known for
  418.      their technical accuracy can seem dense and unreadable in places,
  419.      and you might at times need to back up a primer with a reference.
  420.  
  421.      Do make sure that you get the latest edition of any of these books
  422.      you decide to purchase. Also please check to see if there is an
  423.      errata list available online for any book you decide on; this is
  424.      particularly important for programming language texts. It pays to
  425.      be suspicious of books for which such lists cannot be located
  426.      online for whatever reason.
  427.  
  428.      The Association of C and C++ Users maintains a collection of book
  429.      reviews taken from its journals. Many of the reviews are fair and
  430.      excellent in their criticism, though there are a few minor
  431.      inconsistencies and a number of truly awful books have escaped
  432.      with favourable reviews. It's a useful starting-point, though.
  433.       http://www.accu.org/bookreviews/public/
  434.  
  435.      Many C and C++ experts recommend against using ANY book written by
  436.      a certain Herbert Schildt. To see why, read the answer to question
  437.      16. The "Dummies" series of books is not particularly
  438.      well-regarded either in general.
  439.  
  440.  
  441. 14: What are the best books I can learn C from?
  442.  
  443.      If you wish to learn C, the classic text - the "Bible" - is "The C
  444.      Programming Language", 2nd Edition, by Brian Kernighan and Dennis
  445.      Ritchie. This hallowed text describes and explains ANSI C. K&R2 is
  446.      renowned for its brevity, clarity, elegance and completeness; but
  447.      these very factors can make it heavy going for the beginner.
  448.       http://cm.bell-labs.com/cm/cs/cbook/
  449.  
  450.      K N King's "C Programming: A Modern Approach" is another text
  451.      frequently recommended on comp.lang.c. This book is a good,
  452.      thorough introduction to C that is a lot easier to work with
  453.      from a beginner's perspective.
  454.       http://knking.com/books/c/
  455.  
  456.      Another frequently recommended book on C is "C - How to
  457.      Program", 2nd Edition, by H M Deitel and P J Deitel. Please note
  458.      that I have not had a chance to read this book, and include the
  459.      reference on the strength of the the recommendation of a number
  460.      of regular posters to comp.lang.c.
  461.       http://www.deitel.com/products_and_services/publications/chtp2.htm
  462.  
  463.  
  464. 15: What are the best books I can learn C++ from?
  465.  
  466.      Before going further, I should mention that I am not a C++
  467.      programmer myself, and the recommendations listed here are based on
  468.      positive comments I have heard from others.
  469.  
  470.      The C++ equivalent of K&R2 is "The C++ Programming Language", 3rd
  471.      Edition, by Bjarne Stroustrup. Experienced C++ programmers love it;
  472.      however, many beginners seem to find it very hard going indeed.
  473.      Like K&R2, it assumes basic familiarity with programming concepts
  474.      and is not really intended for the absolute beginner. It does not 
  475.      assume any previous knowledge of C.
  476.       http://www.research.att.com/~bs/about_3rd.html
  477.  
  478.      A more accessible book that is intended for beginners is "C++
  479.      Primer", 3rd Edition, by Stanley Lippman and JosΘe Lajoie. This
  480.      book is thorough, and conforms to the C++ standard. It is
  481.      reportedly extremely clear and detailed, and, again, does not
  482.      assume any previous knowledge of C.
  483.       http://cseng.aw.com/bookdetail.qry?ISBN=0-201-82470-1&ptype=0
  484.  
  485.      Another text I've seen seen particularly recommended is "C++ - How
  486.      to Program", 2nd Edition, by H M Deitel and P J Deitel. Again, this
  487.      text does not assume prior knowledge of C.
  488.       http://www.deitel.com/products_and_services/publications
  489.                                                             /cpphtp2.htm
  490.  
  491.      Other texts I have seen recommended a number of times on the C++
  492.      newsgroups include the badly-named-though-often-recommended "Teach
  493.      Yourself C++ in 21 days" by Jesse Liberty, "C++ Primer Plus" by
  494.      Stephen Prata, and "Thinking in C++" by Bruce Eckel.
  495.       http://www.libertyassociates.com/book_edit.htm#21 Days
  496.       http://www.bruceeckel.com/books.html#ThinkingInCPlusPlus
  497.  
  498.      Bruce Eckel has also placed a "beta" of the second edition of his
  499.      "Thinking in C++" online as well. Do remember that it isn't the
  500.      final version and that there might remain some as-yet undetected
  501.      errors.
  502.       http://www.eckelobjects.com/ThinkingInCPP2e.html
  503.      
  504.      The C++ FAQ contains some recommendations for C++ books as well.
  505.  
  506.  
  507. 16: Why do many experts not think very highly of Herbert Schildt's
  508. books?
  509.  
  510.      A good answer to this question could fill a book by itself. While
  511.      no book is perfect, Schildt's books, in the opinion of many
  512.      gurus, seem to positively aim to mislead learners and encourage
  513.      bad habits. Schildt's beautifully clear writing style only makes
  514.      things worse by causing many "satisfied" learners to recommend his
  515.      books to other learners.
  516.  
  517.      Do take a look at the following scathing articles before deciding
  518.      to buy a Schildt text.
  519.       http://www.lysator.liu.se/c/schildt.html
  520.       http://herd.plethora.net/~seebs/c/c_tcr.html
  521.  
  522.      The above reviews are admittedly based on two of Schildt's older
  523.      books. However, the language they describe has not changed in the
  524.      intervening period, and several books written at around the same
  525.      time remain highly regarded.
  526.      
  527.      The following humorous post also illustrates the general feeling
  528.      towards Schildt and his books.
  529.       http://www.qnx.com/~glen/deadbeef/2764.html
  530.  
  531.      There is exactly one and ONLY one C book bearing Schildt's name on
  532.      its cover that is at all recommended by many C experts - see Q 25.
  533.  
  534.  
  535. 17: Where can I get a free C or C++ compiler?
  536.  
  537.      (Answer adapted from Joe Buck's FAQ for g++ and libg++.)
  538.   
  539.      * gcc
  540.  
  541.       gcc is a free C and C++ compiler from the Free Software
  542.       Foundation available for many Unix-based systems. Its ports for
  543.       other systems are also freely available.
  544.        http://www.fsf.org/software/gcc/gcc.html
  545.        ftp://prep.ai.mit.edu/pub/gnu/
  546.  
  547.       egcs (the experimental gnu compiler system) is another free
  548.       project (based on gcc). Check out
  549.        http://www.cygnus.com/egcs/
  550.      
  551.       The MS-DOS port (DJGPP) of gcc runs on a 386 or higher, and is a
  552.       full 32-bit compiler. Make sure you read the FAQ thoroughly
  553.       first, however, and post any questions you have regarding its
  554.       setup to comp.os.msdos.djgpp, not here.
  555.        http://www.delorie.com/djgpp/
  556.  
  557.       For a port of gcc that works on 32-bit Windows, look at
  558.        http://www.cygnus.com/misc/gnu-win32/
  559.       Also, for another port, see
  560.        http://www.xraylith.wisc.edu/~khan/software/
  561.                                            gnu-win32/egcs-mingw32.html
  562.  
  563.       You could also get hold of Bloodshed Dev-C++, which is
  564.       essentially Mingw32 bundled with an editor, packaged in an
  565.       easier-to-use form.
  566.        http://www.bloodshed.nu/devc.html
  567.  
  568.       For the Amiga, BeOS, and pOS, look at the GG port of gcc at
  569.        http://www.ninemoons.com/GG/
  570.  
  571.       EMX is a port of gcc to OS/2 that also works on DOS.
  572.        http://www.os2ss.com/unix/emx09c/
  573.  
  574.  
  575.      * lcc
  576.  
  577.       lcc-win32 is a free C compiler available for 32-bit Windows.
  578.        http://www.cs.virginia.edu/~lcc-win32/
  579.  
  580.       It is based on the retargettable lcc system.
  581.        http://www.cs.princeton.edu/software/lcc/
  582.  
  583.  
  584.      * Pacific C
  585.  
  586.       The Pacific C compiler is available for free for personal use.
  587.       You can download it from
  588.        http://www.hitech.com.au/products/pacific.html
  589.  
  590.  
  591.      * MPW
  592.  
  593.      If you're programming under the Apple Macintosh, you can obtain
  594.      the Macintosh Programmers' workshop for free.
  595.       http://developer.apple.com/tools/mpw-tools/
  596.  
  597.  
  598.      * Turbo C
  599.  
  600.      Inprise (formerly known as Borland) have commenced making older
  601.      versions of their software available for free download. This
  602.      includes older (possibly pre-standard) versions of their Turbo C
  603.      compiler.
  604.       http://community.borland.com/museum/
  605.  
  606.  
  607.      * Micro-C
  608.  
  609.       If you are looking for a free C compiler for MS-DOS that is easy
  610.       to install and use, take a look at Micro-C, available from
  611.        http://www.dunfield.com/
  612.  
  613.       Do bear in mind that it is not wholly compatible with
  614.       the standard. The incompatibilites are well-documented, however.
  615.  
  616.  
  617. 18: What good websites/online references exist for C and C++?
  618.  
  619.      http://www.lysator.liu.se/c/ is an excellent resource for C,
  620.      containing a number of extremely useful links and pointers.
  621.  
  622.      For beginners to C (and C++), Jack Klein has put up an excellent
  623.      page with tips, suggestions and expanded answers to a number of
  624.      commonly asked beginners' questions.
  625.       http://home.att.net/~jackklein/c/c_main.html
  626.  
  627.      The Comeau Computing web site features several highly informative
  628.      and useful resource pages, including
  629.       http://www.comeaucomputing.com/resources/litsuggs.html
  630.       http://www.comeaucomputing.com/faqs/cppfaq.html
  631.  
  632.      Steve Summit has archived some of his longer and more informative
  633.      Usenet posts at
  634.       http://www.eskimo.com/~scs/readings/index2.html
  635.  
  636.      Check out the C++ Virtual Library for some useful C++ links.
  637.       http://www.desy.de/user/projects/C++.html
  638.  
  639.      You may wish to look at the C Language Online Journal at
  640.       http://www.cs.wustl.edu/~jxh/CLOJ/
  641.  
  642.      For some useful code snippets (some portable; others not),
  643.      check out Bob Stout's SNIPPETS archive at
  644.       http://www.snippets.org/
  645.  
  646.      Karim Ratib's well-indexed code page has links to many useful
  647.      resources.
  648.       http://www.iro.umontreal.ca/~ratib/code
  649.      
  650.      Martin Leslie's C Programming reference site is at
  651.       http://www.gator.net/~garyg/C/c.html
  652.  
  653.      Jamie Blustein's C Programming Language resources are at
  654.       http://www.csd.uwo.ca/~jamie/.Refs/C-refs.html
  655.  
  656.      Scott McMahan's C Programmer's Notebook, which discusses a
  657.      number of issues C programmers encounter as their experience
  658.      grows, is at
  659.       http://www.skwc.com/essent/prognotebook.html
  660.  
  661.      Some questions relating to what standard C is all about are
  662.      answered at
  663.       http://lglwww.epfl.ch/~wolf/c/
  664.  
  665.      Also, check out
  666.  
  667.      The Mining Company's C/C++ site,
  668.       http://cplus.miningco.com/
  669.      
  670.      Jon Morris Smith's C++ resources directory,
  671.       http://www.cs.bham.ac.uk/~jdm/cpp.html
  672.  
  673.      Robert Davies' list of online C++ references,
  674.       http://nz.com/webnz/robert/cpp_site.html
  675.  
  676.      The #C++ site,
  677.       http://www.cl.ais.net/morph/c++/main.html
  678.  
  679.      and Simo Salminen's Programmers' Oasis C and C++ page.
  680.       http://www.utu.fi/~sisasa/oasis/oasis-cc++.html
  681.  
  682.  
  683. 19: Should I learn C before learning C++?
  684.  
  685.      According to a number of C++ experts, including its creator Bjarne
  686.      Stroustrup, and Marshall Cline (the author of the C++ FAQ), the
  687.      answer is a firm no.
  688.  
  689.      Look up the C++ FAQ to see why Cline thinks you do not need to
  690.      learn C before C++. A post by Bjarne Stroustrup to comp.lang.c++
  691.      addresses this point too.
  692.        http://www.research.att.com/~bs/learn.html
  693.  
  694.      "Learning Standard C++ as a New Language" - a paper by Stroustrup
  695.      available from http://www.research.att.com/~bs/papers.html -
  696.      examines this much-debated issue in great depth, but the paper is
  697.      aimed more at educators than at beginners.
  698.  
  699.  
  700. 20: What is the difference between C++ and Visual C++?
  701.  
  702.      C++ is a programming language. Visual C++ is Microsoft's
  703.      implementation of it. When people talk about learning Visual C++,
  704.      it usually has more to do with learning how to use the programming
  705.      environment, and how to use the Microsoft Foundation Classes (MFCs)
  706.      for Windows rather than any language issues. Visual C++ can and
  707.      will compile straight C and C++.
  708.  
  709.      
  710. 21: What is portability? Why are so many people concerned about it?
  711.  
  712.     C and C++ are languages that are not tied down to a particular
  713.     platform. This means that, with care, it is possible to write useful
  714.     code in either of these languages that will run on different
  715.     platforms without modification.
  716.  
  717.     That is not to say that ALL code written in these languages must
  718.     conform strictly to the standards - in practice it is sometimes
  719.     neither possible nor desirable to achieve this aim. However, the job
  720.     of porting code is made easier when any system-specific stuff is
  721.     carefully packaged or abstracted away, so that it is clear and
  722.     straightforward to make the necessary changes during a port.
  723.  
  724.     In order to be able to do this effectively, it is important to be
  725.     aware of what can and can not be done within the realms of the
  726.     standards set by these languages. That is why a lot of importance is
  727.     placed on adhering strictly to the standards, at least while
  728.     learning.
  729.  
  730.  
  731. 22: How do I BEGIN to write C or C++ under Visual or Borland C++?
  732.  
  733.      This question is, strictly speaking, off-topic, but is answered
  734.      here since it's one that seems to plague many beginners.
  735.  
  736.      To start with, you need to make sure that you are not writing a
  737.      Windows application. Try creating a new project or application
  738.      to target MS-DOS, QuickWin or Win32 Console depending on your
  739.      compiler version. You can then use the Standard C and C++
  740.      libraries to write strictly conforming programs. It's best to
  741.      learn to write standard-conforming programs first before
  742.      branching off into writing Windows programs.
  743.  
  744.      If you find that you are having a lot of trouble setting up your
  745.      compiler, a good place to ask questions is a newsgroup devoted to
  746.      your compiler. See Question 10 for a list of such groups.
  747.  
  748.  
  749. 23: HELP! My program seems to compile correctly, but when it runs, a DOS
  750. window flashes and then vanishes.
  751.  
  752.      This can sometimes occur when you are developing programs using an
  753.      IDE. A command prompt window opens and displays the output, and
  754.      control is passed back immediately to the IDE.
  755.  
  756.      To get around this, you can look through the various menus to find
  757.      a "View Output Screen" option. Alternatively, you could open a
  758.      command prompt window and change directory to the one your
  759.      executable is going to end up in and run your executable directly
  760.      from there.
  761.  
  762.      The solution of using a non-standard function to keep the
  763.      executable running until a key is pressed is not a very good idea -
  764.      especially if you are going to run your program outside of the
  765.      development environment.
  766.  
  767.  
  768. 24: Why doesn't this FAQ cover language issues?
  769.  
  770.      This is because other better, more comprehensive resources exist
  771.      for this purpose. See the answers to questions 12 and 18.
  772.  
  773.  
  774. 25: Where can I obtain a copy of the standards for C and C++?
  775.  
  776.      You cannot obtain copies of the standards for free. This is because
  777.      the standards organisations earn a large part of their revenue from
  778.      selling printed copies.
  779.  
  780.      The C FAQ tells you how you can obtain copies of the C standard.
  781.      You could also buy "The Annotated ANSI C Standard", by the
  782.      afore-mentioned Herbert Schildt (question 16). Make sure that you
  783.      ignore the annotations completely, however.
  784.  
  785.      The C++ standard can be obtained online directly from the ANSI
  786.      Electronic Standards store . After registering yourself for free,
  787.      you can download the document in Adobe PDF format on payment of
  788.      $18.00 (US) by credit card.
  789.       http://webstore.ansi.org/ansidocstore/default.asp
  790.  
  791.      The standards documents can be daunting at first sight; meant, as
  792.      they are, to be as formal and precise as possible. They are NOT
  793.      suitable for learning from, but are intended rather to be used as
  794.      the ultimate authority to check with on any language issue.
  795.  
  796.      Also, check the comp.std.c++ FAQ.
  797.       http://reality.sgi.com/austern_mti/std-c++/faq.html
  798.  
  799.  
  800. 26: HELP! I get errors when I try to compile "hello, world"!
  801.  
  802.      Check your source to make sure you haven't missed any semi-colons
  803.      or braces. Also remember that C and C++ are case-sensitive - Main()
  804.      and main() are completely different, for instance. If you are
  805.      satisfied that the program source is all right, then you probably
  806.      have not set your compiler up properly. You might need to ask one
  807.      of the experts in a newsgroup devoted to your compiler about this -
  808.      see the answer to question 10.
  809.  
  810.      The sole reason for redirecting compiler setup questions to other
  811.      groups is to reinforce the point that a language is inherently
  812.      separate from an implementation of one. There are simply too
  813.      many different implementations of C and C++, and too many
  814.      subtleties involved in the actual learning of C and C++ for all
  815.      of them to come under the banner of this newsgroup.
  816.  
  817.  
  818. 27: Which language should I learn first then - C or C++?
  819.  
  820.      The answer to this depends on your own inclinations. C is a
  821.      smaller, less complex language than C++, and is consequently easier
  822.      to master. However, it is probably easier to get up to speed with
  823.      C++, if you make effective use of the standard library. Some find C
  824.      to be more elegant than C++, others think it to be too "unsafe".
  825.      C++ programmers generally feel that it has features that make it
  826.      easier to write good, robust, readable and maintainable code in
  827.      than in C.
  828.  
  829.      If you do decide to learn C++, there is little point in learning
  830.      C itself first. See also question 19.
  831.  
  832.      If you have little or no programming experience, be prepared to
  833.      face a real challenge. C and C++ have enough quirks and subtleties
  834.      to catch out even expert programmers in other languages. It's not
  835.      impossible to learn to program with C or C++ as a first language,
  836.      just more difficult than with Turing, Pascal or a structured
  837.      BASIC, for instance. Programming in C or in C++ is generally
  838.      considered to be a more pleasureable experience than doing so
  839.      in beginners' languages by those experienced in either, but the
  840.      very fact that your freedom is limited and restricted by these
  841.      languages makes them easier to learn.
  842.  
  843.  
  844. 28: Why are C and C++ so popular and widely-used?
  845.  
  846.      (First part of answer adapted from a March 1998 comp.lang.c post
  847.      by Kaz Kylheku on "Why Has C Proved To Be Such A Succesful
  848.      Language")
  849.  
  850.      C has always been a language that never attempts to tie a
  851.      programmer down - it allows for easy implementation, it comes with
  852.      a genuinely useful standard library that can itself be implemented
  853.      in C, and it is both efficient and portable. C has always appealed
  854.      to systems programmers who like the terse, concise manner in which
  855.      powerful expressions can be coded. C was widely distributed with an
  856.      Operating System (Unix) that was actually largely written in C
  857.      itself. Also, C allowed programmers to (while sacrificing
  858.      portability) have direct access to many machine-level features that
  859.      would otherwise require the use of Assembly Language.
  860.  
  861.      As Dennis Ritchie writes in his paper, "The Development of the C
  862.      Language",
  863.  
  864.          C is quirky, flawed, and an enormous success. While accidents
  865.          of history surely helped, it evidently satisfied a need for a
  866.          system implementation language efficient enough to displace
  867.          assembly language, yet sufficiently abstract and fluent to
  868.          describe algorithms and interactions in a wide variety of
  869.          environments.
  870.  
  871.      C++ has its basis in C - extending it by supporting features meant
  872.      to encourage and support the development of large programs. Perhaps
  873.      most importantly, it supports object-oriented programming in a
  874.      familiar setting and framework (that of C). When C++ was created,
  875.      one of the initial aims was to retain compatibility with C to as
  876.      large an extent as possible, and retain its spirit and efficiency.
  877.      It was possible to convert from C to C++ gradually, thus making use
  878.      of C++ (initally, at least) as a "better C", and moving on to
  879.      using other features. This allowed many C programmers to learn C++
  880.      quickly (though using C++ effectively requires a major mind-shift
  881.      for many C programmers).
  882.  
  883.  
  884. 29: Why is this FAQ so grumpy/terse/curt/unfriendly?
  885.  
  886.      A lot of questions posted in alt.comp.lang.learn.c-c++ are posted 
  887.      by people who are generally unsure about what they are learning.
  888.      Many beginners fail to appreciate that C and C++ are used on a
  889.      number of platforms, and that what works with a particular compiler
  890.      is not necessarily going to work with another, even on the same
  891.      platform. It is important that a learner be clear about the
  892.      differences between programming in standard C or C++, and
  893.      programming using platform- and compiler-specific extensions. In
  894.      the long run, this approach - that of separating the idea of
  895.      "language" and "platform" - leads to a better understanding of both
  896.      the language and the platform. It is generally accepted that the
  897.      sooner this is appreciated by the learner, the better. Usenet style
  898.      in general tends to be terse and to-the-point and this FAQ reflects
  899.      that, while attempting to be as fully informative as possible.
  900.  
  901.      This is the only reason for grumpiness - most interested learners
  902.      find alt.comp.lang.learn.c-c++ a very pleasant and helpful place
  903.      once they understand this. The newsgroup is nowhere near as grumpy
  904.      as this FAQ might suggest - certainly not towards someone who has
  905.      read and understood all it has to say!
  906. -- 
  907. { Sunil Rao }
  908. "...certainly no beast has essayed the boundless, infinitely 
  909.  inventive art of human hatred. No beast can match its range and
  910.  power." - Arundhati Roy, "The God of Small Things", 1997.
  911.