Re: C++ snippets

Discussion in 'C++' started by Balog Pal, Feb 15, 2011.

  1. Balog Pal

    Balog Pal Guest

    "K4 Monk" <>
    > So,, I downloaded C++ and C snippets archive from http://www.snippets.org/
    > but to my dismay, almost all examples are written with DOS in mind and
    > assume the user has Turbo C++ or Borland C++ installed (ah the
    > nostalgia!)


    Sure, we used snippets like 20 years ago, even then mostly the assy
    snippets...

    > Can someone please be kind enough to point me to a repository of C++
    > code which demonstrates language features and has been tested with
    > gcc?


    What do you want them for? Why not use a library (or component) instead?
    We have a plenty of them around, you may look at boost, but better yet go by
    searching the topic you want to solve.

    And no, snippets were not meant to demostrate language or whatever, but to
    insert in the program so you had crc calculation, etc, without the need to
    write your own.
    Balog Pal, Feb 15, 2011
    #1
    1. Advertising

  2. Balog Pal

    K4 Monk Guest

    On Feb 16, 3:56 am, "Balog Pal" <> wrote:
    > "K4 Monk" <>
    >
    > > So,, I downloaded C++ and C snippets archive fromhttp://www.snippets.org/
    > > but to my dismay, almost all examples are written with DOS in mind and
    > > assume the user has Turbo C++ or Borland C++ installed (ah the
    > > nostalgia!)

    >
    > Sure, we used snippets like 20 years ago, even then mostly the assy
    > snippets...
    >
    > > Can someone please be kind enough to point me to a repository of C++
    > > code which demonstrates language features and has been tested with
    > > gcc?

    >
    > What do you want them for?  Why not use a library (or component) instead?
    > We have a plenty of them around, you may look at boost, but better yet go by
    > searching the topic you want to solve.


    I just want to read good and simple C++ code to understand C++
    programming.

    >
    > And no, snippets were not meant to demostrate language or whatever, but to
    > insert in the program so you had crc calculation, etc, without the need to
    > write your own.


    I see, thanks for the clarification. I thought these were just clever
    pieces of code somewhere along the lines of "Programming Pearls"
    K4 Monk, Feb 16, 2011
    #2
    1. Advertising

  3. On 16 fév, 13:23, K4 Monk <> wrote:
    > On Feb 16, 3:56 am, "Balog Pal" <> wrote:
    >
    >
    >
    > > "K4 Monk" <>

    >
    > > > So,, I downloaded C++ and C snippets archive fromhttp://www.snippets.org/
    > > > but to my dismay, almost all examples are written with DOS in mind and
    > > > assume the user has Turbo C++ or Borland C++ installed (ah the
    > > > nostalgia!)

    >
    > > Sure, we used snippets like 20 years ago, even then mostly the assy
    > > snippets...

    >
    > > > Can someone please be kind enough to point me to a repository of C++
    > > > code which demonstrates language features and has been tested with
    > > > gcc?

    >
    > > What do you want them for?  Why not use a library (or component) instead?
    > > We have a plenty of them around, you may look at boost, but better yet go by
    > > searching the topic you want to solve.

    >
    > I just want to read good and simple C++ code to understand C++
    > programming.


    Read from (good) books and (good) articles.

    You could start with old C++ Report CUJ articles. You can still find
    some of them here and there.

    ACCU Overload also has some godd ressources and is freely available.

    --
    Michael
    Michael Doubez, Feb 16, 2011
    #3
  4. Balog Pal

    Jorgen Grahn Guest

    On Wed, 2011-02-16, Michael Doubez wrote:
    > On 16 fév, 13:23, K4 Monk <> wrote:
    >> On Feb 16, 3:56 am, "Balog Pal" <> wrote:
    >> > "K4 Monk" <>

    ....
    >> > > Can someone please be kind enough to point me to a repository of C++
    >> > > code which demonstrates language features and has been tested with
    >> > > gcc?

    >>
    >> > What do you want them for?  Why not use a library (or component) instead?
    >> > We have a plenty of them around, you may look at boost, but better yet go by
    >> > searching the topic you want to solve.

    >>
    >> I just want to read good and simple C++ code to understand C++
    >> programming.

    >
    > Read from (good) books and (good) articles.


    And read this newsgroup!

    But I have to agree with "K4 Monk" -- nothing beats reading good,
    real, *useful* code. Or rather, *working* with it: modifying it and so
    on.

    We have discussed this before: which open source projects use C++ and
    have what we believe is decent code? I know of a few which /use/ C++
    (lftp, rtorrent, groff) but I don't know which ones are good examples
    and which ones are bad.

    /Jorgen

    --
    // Jorgen Grahn <grahn@ Oo o. . .
    \X/ snipabacken.se> O o .
    Jorgen Grahn, Feb 17, 2011
    #4
  5. Balog Pal

    K4 Monk Guest

    On Feb 17, 11:50 pm, Jorgen Grahn <> wrote:
    > On Wed, 2011-02-16, Michael Doubez wrote:
    > > On 16 f v, 13:23, K4 Monk <> wrote:
    > >> On Feb 16, 3:56 am, "Balog Pal" <> wrote:
    > >> > "K4 Monk" <>

    > ...
    > >> > > Can someone please be kind enough to point me to a repository of C++
    > >> > > code which demonstrates language features and has been tested with
    > >> > > gcc?

    >
    > >> > What do you want them for? Why not use a library (or component) instead?
    > >> > We have a plenty of them around, you may look at boost, but better yet go by
    > >> > searching the topic you want to solve.

    >
    > >> I just want to read good and simple C++ code to understand C++
    > >> programming.

    >
    > > Read from (good) books and (good) articles.

    >
    > And read this newsgroup!
    >
    > But I have to agree with "K4 Monk" -- nothing beats reading good,
    > real, *useful* code. Or rather, *working* with it: modifying it and so
    > on.
    >
    > We have discussed this before: which open source projects use C++ and
    > have what we believe is decent code?  I know of a few which /use/ C++
    > (lftp, rtorrent, groff) but I don't know which ones are good examples
    > and which ones are bad.
    >
    > /Jorgen
    >
    > --
    >   // Jorgen Grahn <grahn@  Oo  o.   .  .
    > \X/     snipabacken.se>   O  o   .


    thank you! Yes I'd also be interested to know of any good open source
    projects made with C++. Right now I'm reading Bjarne Stroustrup's book
    "Programming Principles and Practice" as recommended by many posters
    earlier. There is one project which I had looked at a long time ago:
    http://www.webtoolkit.eu/wt but back then I didn't know much C++ to
    even begin to understand the concepts.
    K4 Monk, Feb 18, 2011
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. - Steve -

    Reusing Code Snippets

    - Steve -, Sep 30, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    409
    Greg Burns
    Oct 1, 2004
  2. Pat

    Where are my Code Snippets?

    Pat, Apr 20, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    380
    Simon Harris
    Apr 23, 2005
  3. Steve Franks
    Replies:
    2
    Views:
    348
    Juan T. Llibre
    Sep 11, 2005
  4. Edwin Knoppert
    Replies:
    0
    Views:
    356
    Edwin Knoppert
    Nov 30, 2005
  5. Committing Code Snippets

    , Dec 17, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    340
Loading...

Share This Page