| cantog (13) | |
|
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:) | |
|
|
|
| jsmith (5804) | |
|
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. | |
|
|
|
| helios (9442) | |
| Write a doubly-linked list structure. It should at least take ints, and optionally any type. | |
|
|
|
| cantog (13) | |
|
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) | |
|
|
|
| hubbu (5) | |
| 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
|
|
| R0mai (663) | ||
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. | ||
|
|
||
| chrisname (5253) | |
|
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. | |
|
|
|
| Splinter007 (8) | |
|
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 | |
|
|
|
| Bazzy (6275) | |
|
@Splinter007 that is not so challenging and it can be solved in a single line of code | |
|
|
|
| Splinter007 (8) | |
| 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... | |
|
|
|
| Bazzy (6275) | |
| I don't want to go offtopic but you need to use getline http://www.cplusplus.com/reference/string/getline/ | |
|
|
|