Forum: C++ May 21st, 2009 |
| Replies: 15 Views: 731 I don't see how this is a question of what function you are using. Generate a pseudo-random number, then use the modulus operator to force your result to be between 0 and whatever. Then use addition... |
Forum: C++ May 14th, 2009 |
| Replies: 3 Views: 417 Judging by the fact that you got the expected output, and not an error, it seems like a safe assumption, doesn't it? If you're concerned about it, run some tests on varying inputs. You'll probably... |
Forum: C++ May 12th, 2009 |
| Replies: 7 Views: 1,201 [Warning: This is coming from a Java programmer with no C++ experience]
Assuming that clicking 'X' generates an event, and C++ has method overriding - override the method that closes the window... |
Forum: C++ Apr 25th, 2009 |
| Replies: 46 Views: 2,491 Actually I disagree. I don't know any C++ but I was attempting to learn the answer to the OP's question, and it was practically impossible to wade through all of the crap in this thread. Your... |
Forum: C++ Apr 24th, 2009 |
| Replies: 46 Views: 2,491 Yeah, I think the clever code is called a runtime error. I'm no expert though. |
Forum: C++ Jan 17th, 2009 |
| Replies: 4 Views: 999 You need to keep track of the size of your array, then loop over the contents which have been filled, adding them. If it was an array of Objects, and the array was initialized to null (same as... |
Forum: C++ Jan 17th, 2009 |
| Replies: 6 Views: 436 And I quote you the same post I made to you when you posted this exact thread on PFO: |