I have had a course on C++ and have done some minor projects on implementing data structures in C++. Can I find a not-so-difficult good open source C++ project that follows good programming styles. I want to have an understanding of a real project.
5 Answers
Search on Google Code Project Hosting or SourceForge, or even better still, do a search for C++ projects on Ohloh. Unfortunately you cannot do searches on code quality, but at least you can see a report on the projects page to find some with good quality metrics and relatively small codebases.
Some projects that I've come across with good code quality and in c++:
- Relatively small codebase:
- Not that easy to get into:
- Never really looked at but could be interesting:
More importantly, just look around and see if a software you like and use often is developed in C++. You'll have a greater incentive to contribute and to see your changes in real-life and used by others.
You may also want to refer yourself to these other SO questions:
If you are looking for small but powerful project I recomend you DGLE - minimalistic, cross-platform, multi-render(OpenGL, DirectX) graphic engine with plugin based architectire wrtitten in modern C++. Unlike similar projects it only takes about 20-30 files. Also developers regularly updates sources to accomodate C++11/14/17...

- 59
- 8
Dungeon Crawl Stone Soup has an excellent, large, Open Source code base with a large community of code contributors. Everything is well named and well factored into classes, methods and files. It even covers language translations. It has excellent instructions for how to contribute. And it's a great game!
If there's one flaw there is no API documentation, but quite honestly it is so well named and factored you can figure it all out quite easily.

- 153,029
- 25
- 195
- 336
I would recommend source code produced by fsf teams such as Ubuntu (for example), as far as i know they are quite strict on the source code provided.

- 511
- 4
- 6
-
1
-
They are quite strict because, for example, they have coding standards and if you don't follow them, they simply refuse the code. – Grokwik Dec 02 '10 at 10:56
Coding Style will be different from one project to other as usually they've set of guidelines and design principle for the project. I suggest you to go some sites, like codeproject.com and see the small open source projects out there. If you still need high quality code, I'd suggest you to go for some famous code like
- Filezilla
- Notepad++
- Google Chrome
- Mozilla Firefox.
You can see truly high quality code in http://sourceforge.net/ Go for popular apps.
But you've to notice one thing that, most of the people who works for open source project will surely write highly optimized code. It might be a bit difficult to understand that.
Though I suggested Firefox and Chrome, those are really huge to understand in single shot. I'd suggest you to read the articles from some good programming websites. At the same time, I'd suggest you to read following books - Code Complete 2 - Effective C++ - C++ FAQs

- 10,512
- 7
- 43
- 74