3

Im trying to learn OOP but I need to see some real case scenarios of using C++. For me, as a beginner in programming internet is too big and the book is too few examples. All I find on the source repositories are large projects or too few details.

Can you give me a link to some c++ projects which are good for beginners? It will be great if the samples have some details about good practices.

maybe some universities are hosting such projects or maybe you know a webpage with samples and contests about how to program in C++ and it is good for beginners.

dole
  • 343
  • 2
  • 6
  • 23
  • 2
    What book are you using? It sounds like you might find something better on [The Definitive C++ Book Guide and List](http://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list). – Bill the Lizard Oct 19 '10 at 12:20
  • Such thing would be cool for other languages too... Often a book or a documentation are just explaining the code with trivial (non reallife) examples which are too short or they've divided the original project too much. A simple project with ~5 classes which do trivial things and are in some way related to each other would be perfect. – MOnsDaR Oct 19 '10 at 12:25
  • it is a book written in my native language. Ty for the tip. I'll see what can i have/buy from that list – dole Oct 19 '10 at 12:29
  • indeed MOnsDar. That's my problem. Besides the concepts I have nothing. I need real life scenarios to see, duplicate, modify and learn. Sorry, but this is how i can learn. :( – dole Oct 19 '10 at 12:31
  • just implement something that interest you. That's the best way to learn. Just use books and tutorials as references. Use them as you build your tool(s). – Cesar A. Rivas Jan 15 '11 at 23:49

6 Answers6

1

I'd recommend starting at the C++ Language Tutorial. There are lots of good examples there, including a section on OOP.

Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
0

If you want to learn OOP try looking at these lecture videos, they are fantastic for beginners its in Java but you shouldnt limit yourself to C++ as a learning platform.

http://www.youtube.com/watch?v=KkMDCCdjyW8

kyndigs
  • 3,074
  • 1
  • 18
  • 22
  • TY, but atm I'll stay with C++ on windows using eclipse-cdt IDE. I'm not sure if eclipse is the best tool for a beginner yet. – dole Oct 19 '10 at 12:34
0

I've found such a sample project. The problem is that it is documented well, but the documentation-language is German. There additionally are some classnames which are German etc. There also is no documentation like a class diagram included.

I've written that project some months ago to show a new apprentice some C++ and some object-oriented tasks. Hope its not too complex for your purposes.

This example is not perfect, but perhaps it is what you're searching or other users could get a better idea of what is questioned.

Download (Rapidshare.com)

PS: How should someone upload such things in the future? There are several source-files included (pastebin wouldn't be good for something like that). I wouldn't use Sourceforge for such a project. Is there something like a stackoverflow-attachment feature?

BenMorel
  • 34,448
  • 50
  • 182
  • 322
MOnsDaR
  • 8,401
  • 8
  • 49
  • 70
  • ty! thats soo cool idea. My native language is italian but german language is on my "to learn list" bc i like your country too. – dole Oct 19 '10 at 12:52
0

You can take a look at this C++ book: C++ Primer which has good practice exercises and there is also a Answer book for the exercise problems.

codaddict
  • 445,704
  • 82
  • 492
  • 529
0

In addition to all the fabulous lectures / books, I'd encourage you to practice a few times. I enjoy using the bowling kata exercise for this. Technically, this is a refactoring exercise but it is quite fun and I believe effective.

Rick
  • 3,285
  • 17
  • 17
0

I did a screencast of the bowling game in C++ earlier this week. You can watch it here:

https://web.archive.org/web/20200804075400/http://cheezyworld.com/2011/01/12/bowling-game-in-c/

snipsnipsnip
  • 2,268
  • 2
  • 33
  • 34
Cheezy
  • 789
  • 3
  • 6