Search:

Type: Posts; User: GReaper

Page 1 of 20 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    3
    Views
    151

    Compiles and runs just fine for me, without...

    Compiles and runs just fine for me, without having to make the change you did. Are you sure you haven't messed something up? For example, did you initially create the *.c file as a *.cpp file and...
  2. Thread: Startup Item

    by GReaper
    Replies
    3
    Views
    142

    I had a similar problem, it turned out that the...

    I had a similar problem, it turned out that the program had set itself up as a scheduled task in various ways. Launch the "Task Scheduler" and have a look-around.
  3. Replies
    1
    Views
    217

    Your toupper() calls are wrong. You needs to...

    Your toupper() calls are wrong. You needs to first call it for the character before you compare the character with the one you want, not after.

    What I'm saying is:


    // Change this, and others...
  4. There is no portable way for you to do this. The...

    There is no portable way for you to do this. The thing most programmers do is to always read lines with fgets(), and then parse the lines with sscanf().

    Now, this may appear stupid, as many and...
  5. Thread: Those days

    by GReaper
    Replies
    2
    Views
    244

    I once spent many hours trying to debug a program...

    I once spent many hours trying to debug a program I was building, only to find out that (for some bizarre reason) the *.exe file wasn't written to whenever I tried compiling it...
  6. Replies
    7
    Views
    494

    Neither. Those would have too few nodes. What you...

    Neither. Those would have too few nodes. What you need is a tree with somewhere around 20 sub-nodes for each node.

    Oh, you mean like a way to parallelize the possibilities? Sure, you could hand...
  7. Actually, there is a significant different. In C...

    Actually, there is a significant different. In C in particular, and not in C++, if a function declaration/definition argument list is entirely empty, it means that the function can take any number of...
  8. Replies
    12
    Views
    359

    You don't take into account padding on xPos and...

    You don't take into account padding on xPos and xEndPos.
  9. Replies
    24
    Views
    782

    Thank you, I now know what "crewel" means. :D

    Thank you, I now know what "crewel" means. :D
  10. Replies
    24
    Views
    782

    It turns out that the "add 1022/1023" part is a...

    It turns out that the "add 1022/1023" part is a misunderstanding, the challenge just wants you to extract the exponent part of the double value.
  11. Replies
    24
    Views
    782

    I think I came up with a solution. It involves a...

    I think I came up with a solution. It involves a union, a struct and a bitfield... think about it.
  12. Replies
    24
    Views
    782

    What does the task say, exactly? Can you give a...

    What does the task say, exactly? Can you give a link or something?
  13. Replies
    24
    Views
    782

    What are you allowed to use? This is...

    What are you allowed to use? This is ridiculous... I don't think it's possible, at least not without some assembly hacking.

    EDIT: I just had a wacky idea. How about this? It uses a file counter to...
  14. Replies
    24
    Views
    782

    Sure. I take advantage of the fact that array...

    Sure. I take advantage of the fact that array indexing just adds an offset to a pointer. I convert the integer returned by frexp() into a pointer, index it and immediately take that "element's"...
  15. Replies
    24
    Views
    782

    Do you mean that you (a) want the absolute value...

    Do you mean that you (a) want the absolute value or (b) that you want to shift the result +1022 out of the negative?

    a) Simply use fabs()
    b) Now, this can be difficult without any arithmetic or...
  16. Replies
    13
    Views
    384

    I had only heard about oct-trees until I...

    I had only heard about oct-trees until I implemented my own voxel renderer (minecraft clone :D). Ahh, it feels so nice to be able to have 1024x1024 chunks at 60 fps. :p
  17. Replies
    25
    Views
    751

    It's not the IDE's fault you tend to...

    It's not the IDE's fault you tend to misunderstand the effects of a piece of code and of your edits to it. Stop blaming your tools, it's not the knife's fault you cut yourself...
  18. There you go. The link was in the description....

    There you go. The link was in the description.
    GitHub - alugocp/gamepad
  19. I knew that, but I've shamelessly ignored it so...

    For struct _some_name, the name is presumably declared at file scope, and _some_name is in the tag name space of struct. Therefore, the name is not merely "reserved", but really is reserved to the...
  20. Unless I'm referring to the struct inside itself,...

    Unless I'm referring to the struct inside itself, I always use this:


    typedef struct {
    // variables here
    } some_name;


    If I have to though, I give it a "reserved" name:
  21. Replies
    10
    Views
    674

    Of course, an experienced programmer knows when...

    Of course, an experienced programmer knows when it's wise to ignore blanket statements like "never use goto".

    The reason goto is shunned is probably because many assembly programmers back in the...
  22. You can't divide by zero. Dividing zero by...

    You can't divide by zero. Dividing zero by anything (other than zero) is certainly not an error.
  23. Replies
    5
    Views
    485

    fread() take the same arguments, and transfers...

    fread() take the same arguments, and transfers data from the file to memory. Try it. Don't forget to open the file with "rb" though.

    Also, just a bit of advice, don't typedef pointers. Obscuring a...
  24. Yes, that probably happens because the last line...

    Yes, that probably happens because the last line has no '\n' character. To fix that bug, you could count the amount of characters in the current line, and if you reach EOF while the amount is greater...
  25. I've never seen use of "t", and I don't think...

    I've never seen use of "t", and I don't think it's part of the standard. A file stream defaults to text mode anyway.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4