Search:

Type: Posts; User: Time Traveler

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    1,347

    Thanks for uploading it again, it's a neat little...

    Thanks for uploading it again, it's a neat little game. I got reminded of it recently and was surprised when I couldn't find it anywhere, so I thought I should ask what happened.

    The Flash version...
  2. Replies
    9
    Views
    1,516

    You don't need to do anything more for the user...

    You don't need to do anything more for the user to be able to enter 50 integers all at once. They can simply enter, for example, "102 103 550" and so on (without quotes), then press enter. Try it....
  3. Replies
    9
    Views
    1,516

    The interface to the program is a little clumsy...

    The interface to the program is a little clumsy and the code looks somewhat messy.

    Some notes:

    (1) You might want to print the total and count outside your loop, so that it is only done once,...
  4. Replies
    9
    Views
    1,516

    You are only reading in one integer then summing...

    You are only reading in one integer then summing it many times.

    You need to read the integers within a loop, so that it is done repeatedly. The way I see it, there are two possibilities:

    (1)...
  5. Don't use getting characters to check for EOF in...

    Don't use getting characters to check for EOF in this situation, otherwise you need to seek back (or "unget" the character, especially if you're dealing with stdin since seeking probably won't work...
  6. It's ultimately up to you how you abstract away...

    It's ultimately up to you how you abstract away concepts into classes and how these classes interact with each other. There exist good design principles to be followed, but not one correct way to do...
  7. Replies
    16
    Views
    1,642

    You really should be using new and delete for...

    You really should be using new and delete for dynamically allocating memory in C++. Using an STL container like vector to store your string list would also be good. If the library you are using does...
  8. Replies
    4
    Views
    1,165

    There is a subtle mistake in the while loop. You...

    There is a subtle mistake in the while loop. You call strtok and then print out the result, but you do not check if the pointer is null before using cout with the pointer.

    Compare your code to the...
  9. You used some of your variables before...

    You used some of your variables before initialising them. In C, they will contain whatever was in the memory before you allocated it for your variable, which can be pretty much anything (not...
  10. It is generally good practice to always...

    It is generally good practice to always initialise class member variables in constructor initialiser lists. This is because C++ guarantees that they are initialised to something sensible (0 for int,...
  11. You can't dynamically allocate a multidimensional...

    You can't dynamically allocate a multidimensional array in C++ in the same way as in Java. For example,
    new int[X][Y] is invalid. See Multi-Dimensional Arrays - C++ Forum.
  12. Replies
    3
    Views
    1,347

    UberTube - What happened to that game?

    Some years back I remember downloading a free game called UberTube, which I quite enjoyed.

    There are multiple (old) threads in these forums about it. I think '...
Results 1 to 12 of 12