Solved

good C++ source code

Posted on 2000-03-30
7
248 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
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 learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

691 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