Beginner/Intermediate Exercises

Apr 19, 2013 at 10:02pm
Hey, I tried searching for some c++ exercises on Google, but couldn't find many good ones. I was hoping you guys here could think of some exercises for me/other beginners to do. Thanks in advance :)
Apr 20, 2013 at 5:32am
projecteuler.net has some good beginner problems

If you are more interested in contests:
codeforces.com/?locale=en

Another similar question asked:
http://www.cplusplus.com/forum/beginner/99346/
Apr 20, 2013 at 1:22pm
You might cosider looking at this one:
http://www.cplusplus.com/forum/articles/12974/
Apr 20, 2013 at 2:28pm
in my experience exercises are a bad choice for getting to learn the language. c++ is all about abstract objects. in c one can program object-orjented too, the difference between c an c++ is the notion of templates and typechecking. and this you wont learn through practical applications that in reality wont get used in any actual programs lateron. for me it helped going through the sources of stl and writing some additions. for example an iterator that returns to the beginning upon reaching the end, or an iterator that actually returns arbitrary function's output and iterates over all possible input, or various kinds of containers that came to my mind. all this can be done by copying parts of stl-headers and changing them accordingly. IMHO one should really avoid trying to re-write already existing libs, instead take some c-library and try to write a c++ wrapper. this also taught me a lot, but experience from reading stl-sources were a requirement for that. of course I must also emphasize that when starting to learn creating new c++ classes, one should also make a habit of writing a test-program in parallel, a program that tries out the whole public interface of that class and checks it for correctness, and maybe also write documentation...

btw, a book that helped me immensely in learning c++ (after reading "thinking in c++") is the book by Eric Evans "Domain-Driven Design: Tackling Complexity in the Heart of Software" -- before reading this book I really had no idea what object orjented programming was all about. read it and then try to design the correct Domain-Driven c++ wrappers for various c-libs...
Last edited on Apr 20, 2013 at 4:18pm
Topic archived. No new replies allowed.