Search:

Type: Posts; User: TomasRiker

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    1,949

    Try #include

    Try #include <fs.h>
  2. Replies
    41
    Views
    6,793

    Your code is wrong in almost every way ... - for...

    Your code is wrong in almost every way ...
    - for every x there will be a j so that j%x==0, which is obvious because j goes from 2 to x
    - you sum up the wrong value (j instead of x)
    - you sum up in...
  3. Replies
    21
    Views
    35,142

    There's no portable way to do this.

    There's no portable way to do this.
  4. Try SDL, a multimedia library: Simple DirectMedia...

    Try SDL, a multimedia library: Simple DirectMedia Layer
    It will allow you to read each key's state individually (within the limitations of your keyboard).
  5. Replies
    3
    Views
    1,128

    Arrays can't be assigned. You have to use strcpy...

    Arrays can't be assigned.
    You have to use strcpy (in C) or std::string (C++).
  6. Replies
    20
    Views
    3,583

    Also, you compare b and c although they are...

    Also, you compare b and c although they are arrays.
    What you do then is compare their addresses ...
    I guess you have a lot to learn still, maybe you should get a good introduction before trying...
  7. Of course those files are renamed on the server....

    Of course those files are renamed on the server.
    In the simplest case, each file just gets a unique ID which is an increasing number: 1.jpg, 2.jpg, 3.jpg, ...
    But probably they use some kind of...
  8. Replies
    20
    Views
    8,611

    However, in Tetris only 90° rotations are...

    However, in Tetris only 90° rotations are allowed, which kind of simplifies this formula because all the sin and cos terms become -1, 0 or 1!

    ___________
    Visit my project: Online symbolic...
  9. Replies
    4
    Views
    958

    Just do newArray[i][j] = oldArray[i/2][j/2] for...

    Just do newArray[i][j] = oldArray[i/2][j/2] for each i, j.

    ___________
    Visit my project: Online symbolic derivative calculator
  10. Thread: Midterm

    by TomasRiker
    Replies
    6
    Views
    2,006

    Don't be afraid! When you are asked to write code...

    Don't be afraid! When you are asked to write code only using pen & paper, nobody should expect your code to be 100% correct.
    At least it was like this during my studies :)

    ___________
    Visit my...
  11. Replies
    12
    Views
    2,357

    You can also do it by AND-ing the integer with 1,...

    You can also do it by AND-ing the integer with 1, 2, 4, 8, 16, ...
    Each AND will check the presence of one bit. Record the highest bit that was set.

    ___________
    Visit my project: Derivative...
  12. Replies
    20
    Views
    8,611

    Do you need help with: - actually rotating the...

    Do you need help with:
    - actually rotating the shapes?
    - checking if a rotation is "allowed" by the game?
    - displaying the rotated shapes?

    ________________
    Visit my project: Derivative...
  13. Replies
    4
    Views
    5,652

    Another thing: You first declare "int i" outside...

    Another thing:
    You first declare "int i" outside the loop and then again in "for(int i".
    This is probably not what you want, as you will have two "i" variables. One will become inaccessible after...
  14. Replies
    7
    Views
    15,404

    As it has been said already, there is no need to...

    As it has been said already, there is no need to use threads.
    Even though it might appear like the objects are all moving "at the same time", really they don't have to!
    Regarding the ghost logic:...
  15. You might need to simulate key presses if the...

    You might need to simulate key presses if the username/password can't be given to the program using command line arguments.
    Is this the case?

    ________________________________
    Visit my project:...
  16. What exactly do you mean with "extract an image"?...

    What exactly do you mean with "extract an image"?
    Is it "hidden" somewhere inside a bigger file? If yes, then you should scan the file for a JPG header and if you find it, try to read a JPG from...
Results 1 to 16 of 17