Learining C++

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Daniel T.

    #16
    Re: Learining C++

    In article <44298f55.22753 05@news.utanet. at>,
    rpbg123@yahoo.c om (Roland Pibinger) wrote:
    [color=blue]
    > On 27 Mar 2006 19:51:04 -0800, "Donkey" <newsdonkey@hot mail.com>
    > wrote:
    >[color=green]
    > >Now I am a beginner in learning C++.[/color]
    >
    > ... and, I assume, a beginner in programming in general.
    >[color=green]
    > >Can anyone answer me three
    > >questions:
    > >1. What free compiler is appropriate for a beginner to use?
    > >2. What books or reference should I choose?
    > >3. What should I pay attention to or What is the key points when I
    > >study C++?
    > >I will appreciate your help.[/color]
    >
    > First you should learn C, not C++, which shall give you a good basis
    > for learning C++.[/color]

    I refer the OP to the FAQ
    <http://www.parashift.c om/c++-faq-lite/how-to-learn-cpp.html#faq-28.2>


    --
    Magic depends on tradition and belief. It does not welcome observation,
    nor does it profit by experiment. On the other hand, science is based
    on experience; it is open to correction by observation and experiment.

    Comment

    • Roland Pibinger

      #17
      Re: Learining C++

      On Tue, 28 Mar 2006 20:35:32 +0000 (UTC),
      ricecake@gehenn om.net.invalid (Marcus Kwok) wrote:[color=blue]
      >Roland Pibinger <rpbg123@yahoo. com> wrote:[color=green]
      >> On 27 Mar 2006 19:51:04 -0800, "Donkey" <newsdonkey@hot mail.com>
      >> wrote:
      >>[color=darkred]
      >>>Now I am a beginner in learning C++.[/color]
      >>
      >> ... and, I assume, a beginner in programming in general.
      >>[color=darkred]
      >>>Can anyone answer me three
      >>>questions:
      >>>1. What free compiler is appropriate for a beginner to use?
      >>>2. What books or reference should I choose?
      >>>3. What should I pay attention to or What is the key points when I
      >>>study C++?
      >>>I will appreciate your help.[/color]
      >>
      >> First you should learn C, not C++, which shall give you a good basis
      >> for learning C++. You will not understand the numerous traps and
      >> gotachas in C++ without the C foundation.[/color]
      >
      >This contradicts the advise given in the FAQ:
      >http://www.parashift.com/c++-faq-lit....html#faq-28.2[/color]

      Then this FAQ contradicts reality :-)
      [color=blue]
      >They recommend not learning C first, since many of the idioms that are
      >good C style are bad C++ style, and thus must be un-learned.[/color]

      Really? That's just a myth we've been told for years. BTW, Bruce Eckel
      just announced a new eSeminar "Thinking in C .. prepare people for C++
      and Java by teaching them the necessary subset of C".

      [color=blue][color=green]
      >> books for beginners should introduce the language as simple as
      >> possible. In that category are:
      >> Deitel & Deitel: "C++ How to program" and[/color]
      >
      >Not recommended:
      >http://accu.org/index.php/book_revie...04&term=deitel
      >[color=green]
      >> Schildt: "C++ from the ground up"[/color]
      >
      >Also not recommended:
      >http://accu.org/index.php/book_revie...8&term=schildt[/color]

      Both reviews can be ignored. As I've said before C++ books for
      beginners should be written for beginners, i.e. by introducing
      language concepts in a very simple and understandable way. Clearly
      Stroustrup wrote a better C++ book but not a book for beginners.
      [color=blue]
      >In fact, most of Schildt's books are not viewed very highly:
      >http://accu.org/index.php/book_revie...t&field=author[/color]

      Schild is a best-selling C++ book author. At the same time his work is
      criticized by many gurus. Why? Because he brings the esoteric black
      art of C++ programming to the masses? Nobody was ever harmed by
      reading one or his books.
      [color=blue]
      >Check out the other book reviews on http://accu.org/ for recommended
      >books for learning:
      >http://accu.org/index.php/book_revie...ew.xqy?subject[/color]

      Thanks, I have read many of the recommended C++ books.

      Best regards,
      Roland pibinger

      Comment

      • Phlip

        #18
        Re: Learining C++

        Roland Pibinger wrote:
        [color=blue][color=green]
        >>They recommend not learning C first, since many of the idioms that are
        >>good C style are bad C++ style, and thus must be un-learned.[/color]
        >
        > Really? That's just a myth we've been told for years. BTW, Bruce Eckel
        > just announced a new eSeminar "Thinking in C .. prepare people for C++
        > and Java by teaching them the necessary subset of C".
        > http://www.artima.com/weblogs/viewpo...?thread=154029[/color]

        That is just a sales pitch for a specific course. A C guru will indeed feel
        threatened by the modern languages, and will promote that taking his course
        will help understand them. And it will. The issue is not what order to
        learn things, but what order to use C++ abilities when you first start
        coding in it.

        In the beginning, there was C, and professors taught it. Then C++ came
        along, and professors moved to teaching C first and then upgrading to C++.

        But C++ was conceived as a new language that re-used as much of C as
        possible. Being a new language, it can be learned first.

        About a decade ago, forums such as this one started promoting that topic,
        and helping professors learn to teach std::string before char[]. C++ and
        its Standard Library form a Very High Level Language, just like Perl or
        Smalltalk.

        So that teaching indeed appears as old to you as a "myth". It ain't. It was
        once heresy.
        [color=blue]
        > Both reviews can be ignored. As I've said before C++ books for
        > beginners should be written for beginners, i.e. by introducing
        > language concepts in a very simple and understandable way. Clearly
        > Stroustrup wrote a better C++ book but not a book for beginners.[/color]

        Uh, total beginners are advised to learn a simpler language first.
        [color=blue]
        > Schild is a best-selling C++ book author. At the same time his work is
        > criticized by many gurus. Why? Because he brings the esoteric black
        > art of C++ programming to the masses? Nobody was ever harmed by
        > reading one or his books.[/color]

        Schildt occassionally indulges in relatively harmless simplifications . But
        he totally pissed off the community, years ago, by refusing to acknowledge
        his reviews, or publish Errata for the line-item problems in his books.

        --
        Phlip
        http://www.greencheese.org/ZeekLand <-- NOT a blog!!!

        Comment

        • Olumide

          #19
          Re: Learining C++

          Donkey wrote:[color=blue]
          > 1. What free compiler is appropriate for a beginner to use?[/color]

          I'd recommend something called MINGW (see: http://www.mingw.org/). Bear
          in mind that MINGW does not come with an IDE.
          [color=blue]
          > 2. What books or reference should I choose?[/color]

          I spent years looking for one book that would learn me C++, and I
          eventually found that book. Its called "The Late Night Guide to C++" by
          Nigel Chapman. Its an excellent, self-contained text, and its author
          does a wonderful job of justifying the uniques feartures of the
          language. I whole heartedly recommend it.

          - Olumide

          Comment

          • n2xssvv g02gfr12930

            #20
            Re: Learining C++

            Donkey wrote:[color=blue]
            > Now I am a beginner in learning C++. Can anyone answer me three
            > questions:
            > 1. What free compiler is appropriate for a beginner to use?
            > 2. What books or reference should I choose?
            > 3. What should I pay attention to or What is the key points when I
            > study C++?
            > I will appreciate your help.
            >[/color]
            1) GCC is the obvious one, IDE use MinGW for Windows or KDevelop for Linux
            2) Look for a book with a presentation style that suits you, and
            preferably covering the ANSI C++ Standard
            3)
            3.1) Scope rules, and Object Orientation when using C++
            3.2) Constructors and Destructors, especially virtual Destructors
            3.2) STL, (Standard Template Library), will save a lot of time
            3.3) operations that have undefined behaviour, (compiler dependent)
            3.4) Practice, persistence, and attention to detail

            I've been chewing on C++ since 1993 and still learning, but then that's
            the geek in me.

            JB

            Comment

            • loufoque

              #21
              Re: Learining C++

              Daniel T. wrote :
              [color=blue]
              > What I mean is, learn <vector> and <string> before you bother with c
              > arrays and <cstring>. Learn the contents of <iostream> <fstream> and
              > <sstream> before you poke your nose in <cstdio>.[/color]

              You shouldn't even use arrays, C-strings or C stdio.

              Comment

              • loufoque

                #22
                Re: Learining C++

                Olumide wrote :
                [color=blue]
                > I'd recommend something called MINGW (see: http://www.mingw.org/). Bear
                > in mind that MINGW does not come with an IDE.[/color]

                You can get Code::Blocks or Dev-C++ which are two IDEs for gcc mingw.

                Comment

                • Gavin Deane

                  #23
                  Re: Learining C++


                  Roland Pibinger wrote:[color=blue]
                  > On 27 Mar 2006 19:51:04 -0800, "Donkey" <newsdonkey@hot mail.com>
                  > wrote:
                  >[color=green]
                  > >Now I am a beginner in learning C++.[/color]
                  >
                  > ... and, I assume, a beginner in programming in general.
                  >[color=green]
                  > >Can anyone answer me three
                  > >questions:
                  > >1. What free compiler is appropriate for a beginner to use?
                  > >2. What books or reference should I choose?
                  > >3. What should I pay attention to or What is the key points when I
                  > >study C++?
                  > >I will appreciate your help.[/color]
                  >
                  > First you should learn C, not C++, which shall give you a good basis
                  > for learning C++.[/color]

                  That's nonsense. There is an argument that a complete beginner should
                  learn a simpler language before moving on to C++. I'm not sure whether
                  I agree with that or not. However, if you do go down that route, C is
                  one of the worst choices of language to start with. Because it is
                  superficially so similar to C++ but idiomatically so different, moving
                  from C to C++ requires a huge amount of unlearning. There is no need to
                  burden a beginner with that extra effort.
                  [color=blue]
                  > When you have a basic understanding of C (esp. pointers and memory
                  > management) you can move on to C++ (probably also in a course).[/color]

                  Aside from any other objection, making a beginner learn advanced C++
                  concepts like that first, rather than showing them concepts that allow
                  them to write programs easily and correctly from the outset is simply
                  unfair. How do expect to keep someone interested for all the time it
                  will take to learn that, when you haven't even shown them how to write
                  Hello World in C++ yet?

                  Perhaps you've been programming long enough that you moved to C++ from
                  a C background. Just because that is the way a lot of today's
                  experienced C++ programmers happened to do it does not in any way imply
                  that it's a suitable route for a beginner whose goal is to learn C++.
                  [color=blue]
                  > IMO,
                  > books for beginners should introduce the language as simple as
                  > possible. In that category are:
                  > Deitel & Deitel: "C++ How to program" and
                  > Schildt: "C++ from the ground up"[/color]

                  Books for beginners must satisfy two criteria. Firstly, they must be
                  easy for the student to read, follow and understand. This is
                  subjective. Only the student can judge, and different students will
                  have different opinions of the same book. Secondly, books must be
                  technically correct, consistent and up to date. This is objective but
                  the student can not know whether this criterion is met. Only expert
                  peer review can.

                  The ACCU reviews for the books you recommend suggest that both fail the
                  second requirement and are therefore undesireable texts for beginners.

                  Gavin Deane

                  Comment

                  • osmium

                    #24
                    Re: Learining C++

                    "loufoque" writes:
                    [color=blue][color=green]
                    >> What I mean is, learn <vector> and <string> before you bother with c
                    >> arrays and <cstring>. Learn the contents of <iostream> <fstream> and
                    >> <sstream> before you poke your nose in <cstdio>.[/color]
                    >
                    > You shouldn't even use arrays, C-strings or C stdio.[/color]

                    I feel that a computer program without files, which yours will be, is
                    pretty well crippled.


                    Comment

                    • Phlip

                      #25
                      Re: Learining C++

                      osmium wrote:
                      [color=blue]
                      > I feel that a computer program without files, which yours will be, is
                      > pretty well crippled.[/color]

                      Hmm. Maybe it's time you were introduced to <fstream>.

                      --
                      Phlip
                      http://www.greencheese.org/ZeekLand <-- NOT a blog!!!


                      Comment

                      • Gary Labowitz

                        #26
                        Re: Learining C++

                        "Roland Pibinger" <rpbg123@yahoo. com> wrote in message
                        news:4429b871.3 11175@news.utan et.at...[color=blue]
                        > On Tue, 28 Mar 2006 20:35:32 +0000 (UTC),[/color]
                        <snip>[color=blue]
                        > Both reviews can be ignored. As I've said before C++ books for
                        > beginners should be written for beginners, i.e. by introducing
                        > language concepts in a very simple and understandable way. Clearly
                        > Stroustrup wrote a better C++ book but not a book for beginners.
                        >[color=green]
                        > >In fact, most of Schildt's books are not viewed very highly:[/color]
                        >
                        >http://accu.org/index.php/book_revie...m=schildt&fiel[/color]
                        d=author[color=blue]
                        >
                        > Schild is a best-selling C++ book author. At the same time his work is
                        > criticized by many gurus. Why? Because he brings the esoteric black
                        > art of C++ programming to the masses? Nobody was ever harmed by
                        > reading one or his books.[/color]

                        This is just a troll. Many of my students have been harmed reading Schildt's
                        Java 2 book. I have to correct several major misstatements and talk them out
                        of the errors based on Schildt's lack of precision. He is criticized for
                        being wrong.


                        Comment

                        • Gary Labowitz

                          #27
                          Re: Learining C++

                          "loufoque" <loufoque@remov e.gmail.com> wrote in message
                          news:442a765a$0 $24183$636a55ce @news.free.fr.. .[color=blue]
                          > Olumide wrote :
                          >[color=green]
                          > > I'd recommend something called MINGW (see: http://www.mingw.org/). Bear
                          > > in mind that MINGW does not come with an IDE.[/color]
                          >
                          > You can get Code::Blocks or Dev-C++ which are two IDEs for gcc mingw.[/color]

                          I've played a little with the MinGW Developer's Studio. Has anyone gone into
                          depth and found if this is a good option?


                          Comment

                          • osmium

                            #28
                            Re: Learining C++x

                            "Phlip" writes:
                            [color=blue]
                            > osmium wrote:[/color]

                            <inserted>[color=blue][color=green][color=darkred]
                            >>>> You shouldn't even use arrays, C-strings or C stdio.[/color][/color]
                            >[color=green]
                            >> I feel that a computer program without files, which yours will be, is
                            >> pretty well crippled.[/color]
                            >
                            > Hmm. Maybe it's time you were introduced to <fstream>.[/color]

                            And just how do you open a file without using a C-string?



                            Comment

                            • Daniel T.

                              #29
                              Re: Learining C++x

                              In article <4925ueFmlbvhU1 @individual.net >,
                              "osmium" <r124c4u102@com cast.net> wrote:
                              [color=blue]
                              > "Phlip" writes:
                              >[color=green]
                              > > osmium wrote:[/color]
                              >
                              > <inserted>[color=green][color=darkred]
                              > >>>> You shouldn't even use arrays, C-strings or C stdio.[/color]
                              > >[color=darkred]
                              > >> I feel that a computer program without files, which yours will be, is
                              > >> pretty well crippled.[/color]
                              > >
                              > > Hmm. Maybe it's time you were introduced to <fstream>.[/color]
                              >
                              > And just how do you open a file without using a C-string?[/color]

                              You use a string literal or a std::string (by applying the c_str
                              member-function.)


                              --
                              Magic depends on tradition and belief. It does not welcome observation,
                              nor does it profit by experiment. On the other hand, science is based
                              on experience; it is open to correction by observation and experiment.

                              Comment

                              • osmium

                                #30
                                Re: Learining C++x

                                "Daniel T." writes:
                                [color=blue]
                                > In article <4925ueFmlbvhU1 @individual.net >,
                                > "osmium" <r124c4u102@com cast.net> wrote:
                                >[color=green]
                                >> "Phlip" writes:
                                >>[color=darkred]
                                >> > osmium wrote:[/color]
                                >>
                                >> <inserted>[color=darkred]
                                >> >>>> You shouldn't even use arrays, C-strings or C stdio.
                                >> >
                                >> >> I feel that a computer program without files, which yours will be, is
                                >> >> pretty well crippled.
                                >> >
                                >> > Hmm. Maybe it's time you were introduced to <fstream>.[/color]
                                >>
                                >> And just how do you open a file without using a C-string?[/color]
                                >
                                > You use a string literal or a std::string (by applying the c_str
                                > member-function.)[/color]

                                My point was that a string literal *is* a C style string. I am willing to
                                drop this thread, it has been belabored enough.


                                Comment

                                Working...