Req: Homework assignment examples

Jun 3, 2009 at 1:33pm
Hi,

I'm studying for my exam in C++ and have run out of examples to solve.
I could make some myself, but I wonder if anyone could provide any links to homework assignments on web. I've googled "Homework assignments", but it doesn't give me much to work with (they are quite trivial).

I appreciate all help:)
Jun 3, 2009 at 2:06pm
You'll have to be more specific about what exactly you are looking for.

You can find any number of homework assignments by perusing some of the threads on these fora.

Jun 3, 2009 at 2:07pm
Write a doubly-linked list structure. It should at least take ints, and optionally any type.
Jun 3, 2009 at 2:20pm
Thanks for the replies.

I'll try to do as you suggest jsmith.
I'm on it helios.

I need more experience working with:
- linked data structures*
- recursion
- inheritance
- polymorphism and virtual functions*
- templates
- pointers and dynamic arrays*
- exception handeling

(* main focus)

Jun 4, 2009 at 8:25pm
I just had a hell of a time writing a quicksort class with recursion as an assignment if that helps any. What about writing a binary tree ?
Last edited on Jun 4, 2009 at 8:26pm
Jun 6, 2009 at 7:39pm
What about writing a binary tree ?

Binary tree is good,
Basic binary tree is not so hard (after doubly-linked list), the hard part starts at iterators...
Also a good way to practice recursion.
Jun 6, 2009 at 7:45pm
I might try Helios' sugestion too.

I just learnt how to use classes. I like classes.

You could also create something like a bubble sort or something.
Jun 7, 2009 at 3:40pm
Hi,

If you want another suggestion:
Write a program that flips words (ex.: "Hello World!" becomes: "!dlrow olleH").

I am working on it myself too, keeps me quite occupied... =p

Greets
Jun 7, 2009 at 4:56pm
@Splinter007
that is not so challenging and it can be solved in a single line of code
Jun 7, 2009 at 8:00pm
I thought so too, but everytime I use a whitespace in the place where you enter the word it has to flip, it seems that the string ends and the whole program goes mad...
Jun 7, 2009 at 8:42pm
I don't want to go offtopic but you need to use getline http://www.cplusplus.com/reference/string/getline/
Jun 8, 2009 at 3:03pm
Topic archived. No new replies allowed.