Like Tree2Likes
  • 2 Post By phantomotap

Good study source code

This is a discussion on Good study source code within the C++ Programming forums, part of the General Programming Boards category; What are some good open source projects to study for good C++ practice? I guess Boost is good for templates ...

  1. #1
    Registered User Inanna's Avatar
    Join Date
    May 2011
    Posts
    69

    Good study source code

    What are some good open source projects to study for good C++ practice? I guess Boost is good for templates and stuff, but which of the Boost libraries should I start with? What about good examples of OOP?

  2. #2
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,411
    I'd stay away from boost, if I were you. It's incredibly complex.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User Inanna's Avatar
    Join Date
    May 2011
    Posts
    69
    I see. So do you have an alternative suggestion? Or should I just stay ignorant?

  4. #4
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,411
    Had I known, I would have included a suggestion. It just happens so that I myself haven't involved myself with a project or decipher or read one, so I wouldn't know.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #5
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,144
    What are some good open source projects to study for good C++ practice?
    None. (Three that I know of, but they are no longer online, and even then they were designed as college projects specifically to be learning tools.)

    Real life projects solve real life problems using real life tools. Reading "Boost", since you brought it up, will not teach you how to do the things you may wish to learn how to do because, again, they have to deal with the real world. (Honestly, that can't be said enough.) The source isn't 100% conformant C++. Instead, the source is 120% or 80% depending on your perspective. The code is cramped with coverages, tweaks, little fixes, and odd little mechanisms to allow the code to work with a lot of different compilers each having different characteristics that must be handled. You'll be covered just trying to follow the logic of these little bits of non-conformant C++ scattered around.

    Do yourself a favor and read these books, and if possible, do every single exercise. When you are done, you'll be able to read any code you want. You'll know what code is standard. You'll recognize code characteristic of code that has been changed to pacify some compiler. You'll certainly know templates, and you'll certainly know "OOP".

    If at that point you want to read source from a project for practice, you'll have no reason not to do exactly that.

    Soma

    Accelerated C++
    The C++ Standard Library
    Effective C++
    More Effective C++
    Effective STL
    Exceptional C++
    More Exceptional C++
    Exceptional C++ Style
    C++ Templates
    C++ Template Meta-programming
    Salem and Elysia like this.

  6. #6
    Registered User Inanna's Avatar
    Join Date
    May 2011
    Posts
    69
    Real life projects solve real life problems using real life tools.
    This is what I want. Books and exercises show things in a sandbox. OOP examples are the worst because they are contrived and unrealistic. I can tell you how OO works in C++ but I am not confident I can write good OO code.

    Do yourself a favor and read these books, and if possible, do every single exercise.
    The only book on that list I have not read is C++ Template Meta-programming. I think I understand C++ enough to read real life code, and I want to look at the best code possible. That is my question, which projects are the best examples of good C++ that I can read to take myself to the next level?

  7. #7
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    One might also suggest that the best way to learn a language is to write it... C++ is no exception. The big problem with reading or viewing is retention... most readers actually retain about half of what they read, people watching videos often retain far less. By writing the language retention rates are much higher... Back in my high school days our French teacher gave us a long assignment --issued mid-year due before finals-- to write an essay about our neighborhoods in French. I learned more from writing that essay then I did from the entire year of French classes.

    To learn C++ write C++
    Last edited by CommonTater; 06-01-2011 at 07:26 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Good reading source for MS VS compilers?
    By Devil Panther in forum Tech Board
    Replies: 3
    Last Post: 12-13-2006, 06:07 AM
  2. Looking for a good source
    By jedispy in forum C++ Programming
    Replies: 5
    Last Post: 08-18-2006, 03:16 PM
  3. what are some good C++ source code examples?
    By orion- in forum C++ Programming
    Replies: 4
    Last Post: 09-13-2005, 09:24 PM
  4. Good colleges for language study
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 10-16-2004, 08:30 PM
  5. Any good places for free source code?
    By VegasSte in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 11-19-2002, 03:22 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21