Solved

good C++ source code

Posted on 2000-03-30
7
234 Views
Last Modified: 2010-04-10
Hi!
I'm trying to learn C++
I think the best way to learn a new language is learning from a good example.
Does anyone know a site that has a good C++ source code?
What I want to see is how to code in
OOP method.

Criteria:
- Strictly C++ (no Win32 programming)
- Intermediate to Advanced
- Good style (no Spaghetti coding like I see in some sites)
- Good use of OOP
- Preferably around 1000 lines of code

Thanks much
0
Comment
Question by:chulsoft
7 Comments
 
LVL 1

Expert Comment

by:cbeattie
ID: 2670195
The C/C++ User's Journal is an excellent resource for example code.  Just go to their home page below and click on the "Code" link on the left hand side.  You can then download code from their current issue and from archives.

http://www.cuj.com/home/  
0
 

Author Comment

by:chulsoft
ID: 2670894
sorry
I need more general type of codes
0
 

Author Comment

by:chulsoft
ID: 2670913
sorry
I need more general type of codes
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 1

Expert Comment

by:cbeattie
ID: 2670938
Check out http://www.codeguru.com, under their C++ & MFC section.
0
 
LVL 4

Expert Comment

by:wylliker
ID: 2671797
Just my two cents ...

While sample code will get you something to look at - C++ can be rather challenging at times and you won't necessarily find all that you need to know from sample, especially - WHY - a program was coded a particular way.  What problem was the code trying to solve? Does the design support the requirements? What were those requirements?  All you really are looking at is an implementation.

Generally the best samples are small snippets that illustrate a concept or those that can be grown upon in stages to re-enforce previous concepts and illustrate higher level concepts.

There are just so many implementation options (and gotchas!!!) to be aware of, especially if working on a large complex system.

You might consider the following books to go along with your sample code browsing:
(I recommend these to all developers new to C++ at our IT shop)

O'Reilly Associates has a fairly good introductory book - C++ The Core Language - Gregory Satir and Doug Brown

To learn more about the do's and don'ts - and more importantly why - I recommend:

Effective C++ - Scott Meyers
More Effective C++ - Scott Meyers

And to understand the language as it was designed, the trade-offs made (and the issues behind them - there is no better source than from the horse's mouth

The Annotated C++ Reference Manual - Bjarne Stroustrup

To each their own, but I find C++ to be much easier to digest if taken in small bites and chewed well otherwise it can lead to painful indigestion or ulcers and if you don't wait to digest before diving in it could lead to drowning.


0
 
LVL 3

Accepted Solution

by:
ufolk123 earned 50 total points
ID: 2671831
For tutorials :
http://devcentral.iftech.com/learning/tutorials/subcpp.asp

For code samples :
Very powerful page :
http://www.softpanorama.org/Lang/cpp.shtml
Data strcuture codes in C++:
http://www.josuttis.com/cppcode/cppcode.html

Hope this helps
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 2672806
software design patterns implemented in C++ are a good source of good code.  the source for stl is also pretty good C++ coding.

0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now