a C++ "workbook"

M

mescaline

Hi,

I am looking for a C++ programming "workbook"

I have learned some basic C++ OOP such as classes, inheritance,
polymorphism, virtual functions, encapsulation and all those la-la
terms... bascially from Bruce Eckel's and the Sams 21 days books.

I have done some programming for classes (like inheriting classes,
using protected, a little bit of templates) but I want to get sharpen
my on-the-terminal programming skills.

Would there be a good exercise book/ online material that would
through these exercises improve my programming skills ... I mean, I
know IN THEORY that virtual destructors are necessary in case of
dynamic object destruction (i.e. to destroy inherited objects (with
pointers) that have been created at run-time) but I haven't *really*
programmed that kind of stuff. Maybe just reproduced on my screen the
code from a book.

Would appreciate any suggestions from you guys on a "workbook" that
would start from the very basics like create a class .. then give
instances of where the protected keyword is most suited ...then delve
into better aspects of polymorphism, some good examples on virtual
functions --- WHAT i need now is hands-on programming with some
independant thought, not reading and writing the code that is given in
a book.

thanks in advance for your suggestions


Thanks.
 
J

jeffc

mescaline said:
Hi,

I am looking for a C++ programming "workbook"

I think some exist, but it seems to me like you might not really need that.
I think what you really need is to do an actual project. If it were me, I'd
program something that you could actually find useful. 2 programs I wrote
for practice are a blackjack simulator (not a game, but a simulator. I told
it to play with various betting strategies, and then looked at how it paid
off after a million hands), and then a little windows app that calculated
postage for me. I need to mail a lot of things of different postage prices.
I told it what denominations of stamps I had, and it reported the best way
to make that total with the stamps I had while wasting the least amount of
money. I had to learn a little Windows programming for that. You'll find
that most of these projects need more than just plain C++. That will help
you decide what else you want to learn more about.
 
J

Jeff Schwab

jeffc said:
I think some exist, but it seems to me like you might not really need that.
I think what you really need is to do an actual project. If it were me, I'd
program something that you could actually find useful. 2 programs I wrote
for practice are a blackjack simulator (not a game, but a simulator. I told
it to play with various betting strategies, and then looked at how it paid
off after a million hands), and then a little windows app that calculated
postage for me. I need to mail a lot of things of different postage prices.
I told it what denominations of stamps I had, and it reported the best way
to make that total with the stamps I had while wasting the least amount of
money. I had to learn a little Windows programming for that. You'll find
that most of these projects need more than just plain C++. That will help
you decide what else you want to learn more about.

Agreed. I still use little home-grown programs I wrote years ago,
including one that helps me balance my checkbook.

Try posting little bits of code here, and ask for advice. You'll be
quite amused to see the Holy Wars that break out over how your code can
be improved. :)
 
W

Wolfgang Kaufmann

* Thus spoke mescaline <[email protected]>:

Hallo,
I am looking for a C++ programming "workbook" [...]
Would appreciate any suggestions from you guys on a "workbook" that
would start from the very basics like create a class .. then give
instances of where the protected keyword is most suited ...then delve
into better aspects of polymorphism, some good examples on virtual
functions --- WHAT i need now is hands-on programming with some
independant thought, not reading and writing the code that is given in
a book.

This is not exactly what you asked for, but you may like the following books:

o Effective C++, Scott Meyers
o More Effective C++, Scott Meyers
o Effective STL, Scott Meyers
o Exceptional C++, Herb Sutter
o More Exceptional C++, Herb Sutter
o The C++ Standard Library, Josuttis

Besides starting an interesting new project on your own, have a look at
open source projects that are looking for you! ;-)

o <http://www.sourceforge.net/>
o <http://savannah.gnu.org/>


Wolfgang.
 
E

Eurig Jones

jeffc said:
I think some exist, but it seems to me like you might not really need that.
I think what you really need is to do an actual project. If it were me, I'd
program something that you could actually find useful. 2 programs I wrote
for practice are a blackjack simulator (not a game, but a simulator. I told
it to play with various betting strategies, and then looked at how it paid
off after a million hands), and then a little windows app that calculated
postage for me. I need to mail a lot of things of different postage prices.
I told it what denominations of stamps I had, and it reported the best way
to make that total with the stamps I had while wasting the least amount of
money. I had to learn a little Windows programming for that. You'll find
that most of these projects need more than just plain C++. That will help
you decide what else you want to learn more about.
Yup I agree too, what you need is a simple idea in your head.. like a board
game maybe, and hack it out. maybe program a lot of the idea for command
line output, then when you fancy teaching yourself a bit about GUI, look
into that and build up on your program.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top