Forum: C++ Aug 4th, 2009 |
| Replies: 3 Views: 238 Sorting concept is simple: from the least to the greatest or from the greatest to the least. To do so, you need to do comparison. So, the magic trick is comparison-rule (which is greater and which is... |
Forum: C++ Aug 2nd, 2009 |
| Replies: 6 Views: 481 If you truly understand the concept of doubly-linked list, these problems would be very easy. Lets start with basic doubly-linked list concept. Doubly-linked list data structure consist of 3... |
Forum: C++ Aug 17th, 2008 |
| Replies: 14 Views: 1,795 Do as what Edward has said and you will able to solve your problem easily. You don't actually need integer to store number, you can just use string to represent the number. First of all, you create... |
Forum: C++ Jul 22nd, 2008 |
| Replies: 6 Views: 693 You might wonder why your problem hasn't been answered. It is obvious that you haven't use the code tag which make it very unfriendly to read your code. I recommend you to tag your code and post your... |
Forum: C++ Jul 22nd, 2008 |
| Replies: 24 Views: 65,419 Text-based Role-Playing Game Project (For Beginners)
Firstly, this game will start with an introductatory storyline of the game to attract player interest. Then, it asks a player to enter his or her... |
Forum: C++ Jul 17th, 2008 |
| Replies: 6 Views: 988 Of course you can have multiple of them. However, try to avoid using it as much as possible since most of the time goto can be replaced with a loop. For some case such as break multiple-level of... |
Forum: C++ Jul 16th, 2008 |
| Replies: 37 Views: 3,552 The first problem has been bothered me alot while I was doing my school-assignment so now I got a chance to solve it now. I think this problem can be solve by using mathematic.
Let say A is the... |
Forum: C++ Jul 16th, 2008 |
| Replies: 19 Views: 1,516 I think you didn't provide enough information about your project. For example: how the loop produce the combination? how will you compare those combination? what is the purpose of your combination?... |
Forum: C++ Mar 14th, 2008 |
| Replies: 30 Views: 10,478 My algorithm is a little bit different. First, I generate the random number into the array in order. Then randomly swap the array elements to make it disorder. For example: I want to generate 11... |
Forum: C++ Feb 14th, 2008 |
| Replies: 16 Views: 1,804 I believe the largest value that your code can generate is 499 :D |
Forum: C++ Jan 31st, 2008 |
| Replies: 8 Views: 1,000 For your redirecting question, you could use do...while loop:
do {
// input your code here
} while (x < 1 && x > 5); // If the input isn't in the range of 1-4, it will process the code in the... |
Forum: C++ Jan 26th, 2008 |
| Replies: 20 Views: 2,515 I don't feel that your code works 100% correctly. What's happen when the first digit is number 9? 9 < 9 == false. |
Forum: C++ Jan 9th, 2008 |
| Replies: 6 Views: 2,689 Within the range of 0 to 49. |
Forum: C++ Dec 25th, 2007 |
| Replies: 4 Views: 599 More comments are needed to be added.
/*********************************
* What is the title of your program? *
* What is the purpose of this program?*
* Written by who? ... |