Search:

Type: Posts; User: DeadPlanet

Page 1 of 16 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    40
    Views
    3,018

    I'd be fine with this thread if the quality of...

    I'd be fine with this thread if the quality of comments was actually good. Regardless of whether you guys are feeding a troll or bashing a noob, this simply isn't that entertaining.

    GrafixFairy,...
  2. Replies
    42
    Views
    11,916

    Possibly not a joke but on the topic of 'Awesome...

    Possibly not a joke but on the topic of 'Awesome things said by Dennis Ritchie''.

    Dennis was once asked "In your experience, how long does it take for a novice programmer to become a C programmer...
  3. You could create a local variable to point at...

    You could create a local variable to point at node->next though and then there would be no problem in deleting node before the recursive call. This creates a local variable though which is kind of a...
  4. Replies
    29
    Views
    4,128

    I don't really know what you're asking. You can...

    I don't really know what you're asking. You can use fseek or fsetpos if you like but it's overcomplicating the issue. Just start at the beginning of the file and read characters (discarding them)...
  5. These probably exist but if everyone knew about...

    These probably exist but if everyone knew about them they would be filled pretty quickly. I'd just advise you to try to get a job where you can meet plenty of different people (a consultant maybe?)...
  6. Replies
    29
    Views
    4,128

    Assuming each member of your structure is on it's...

    Assuming each member of your structure is on it's own line of the file then yiu know that each structure takes up x lines (where x is the number of members in your structure). If I want to get to the...
  7. Replies
    29
    Views
    4,128

    Try to never mix fread/fwrite with...

    Try to never mix fread/fwrite with fprintf/fscanf, use either one set or the other.

    The way you have it now I would recommend using fscanf to read in each field, in a similar (but opposite) way to...
  8. Replies
    29
    Views
    4,128

    Fair warning: I am reasonably drunk and this is...

    Fair warning: I am reasonably drunk and this is too much stuff to proofread so sorry if a lot of this is wrong and riddled with spelling/grammatical errors.

    In future, you should try to develop...
  9. Replies
    29
    Views
    4,128

    Post your entire code here with a detailed...

    Post your entire code here with a detailed explanation of the problems you are having with it and with any compiler warnings/errors that you are encountering.
  10. Replies
    5
    Views
    2,837

    ? For some reason you're trying to create your...

    ?

    For some reason you're trying to create your tree inside insert which isn't working because modifying a local variable has no effect once that variable goes out of scope.

    Also main returns an...
  11. Replies
    5
    Views
    2,837

    ? For some reason you're trying to create your...

    ?

    For some reason you're trying to create your tree inside insert which isn't working because modifying a local variable has no effect once that variable goes out of scope.

    Also main returns an...
  12. Replies
    15
    Views
    1,973

    Have a go at it and post your code. If you can...

    Have a go at it and post your code. If you can print one matrix then printing two matrices shouldn't be that much of a jump.
  13. Replies
    7
    Views
    1,814

    You shouldn't be pushing the the end brackets at...

    You shouldn't be pushing the the end brackets at all, at least not how I understand the problem. You should be pushing every open bracket to the stack and then whenever you encounter a ending bracket...
  14. Replies
    29
    Views
    4,128

    You can't say why...? I'm guessing the code must...

    You can't say why...? I'm guessing the code must be for MI6 or the NSA then.

    There are only two things that I can really tell you from this.
    One is that you shouldn't be using global variables....
  15. Replies
    11
    Views
    998

    I think that that works. Nice solution.

    I think that that works. Nice solution.
  16. Replies
    8
    Views
    954

    Yeah I didn't read close enough the first time....

    Yeah I didn't read close enough the first time. That code makes absolutely no sense.

    Look at it conceptually. The two components of the body of the loop do entirely different things.

    Also...
  17. Replies
    8
    Views
    954

    Yes, you lose everything. You need to free the...

    Yes, you lose everything. You need to free the memory after you no longer require it. Exiting the program doesn't automatically release all the memory to the operating system, or at least you...
  18. Replies
    8
    Views
    954

    Welcome to the forum. Great start. Good...

    Welcome to the forum.

    Great start. Good modularity, good indentation.



    That is kind of a mess and doesn't really make sense. You're not actually using i for anything. What I've been told...
  19. Replies
    11
    Views
    998

    Well I mean parameters are just passed by value...

    Well I mean parameters are just passed by value and it's not like you can pass the index because if you had the index then you wouldn't need to call the function :). I know that it's just pseudocode...
  20. Replies
    11
    Views
    998

    It's not clear what the third argument you're...

    It's not clear what the third argument you're supplying is but if you just supply a on the first call and b on the second then that is correct. Again though, extra care needs to be taken if duplicate...
  21. Replies
    11
    Views
    998

    No. You can't use that approach full stop because...

    No. You can't use that approach full stop because you aren't achieving the running time that you wanted. You don't know how many elements are between a and b so your loop could end up running a worst...
  22. Replies
    11
    Views
    998

    Why not just binary search for a, binary search...

    Why not just binary search for a, binary search for b, and subtract the index of a from the index of b?

    Array is in sorted order so the difference of indexes must be the number of elements between...
  23. Replies
    15
    Views
    1,973

    Let's say that x starts out with the value of 0...

    Let's say that x starts out with the value of 0 before your loop even runs. After your first loop assume that you found three adjacent squares were occupied (assuming the array indexing issue was...
  24. Replies
    15
    Views
    1,973

    Let's say that x starts out with the value of 0...

    Let's say that x starts out with the value of 0 before your loop even runs. After your first loop assume that you found three adjacent squares were occupied (assuming the array indexing issue was...
  25. Replies
    15
    Views
    1,973

    You aren't initialising x on each loop. I...

    You aren't initialising x on each loop.

    I might be wrong because it's been a while but don't diagonally adjacent squares also count?

    I have a feeling that using the gameR matrix is probably...
Results 1 to 25 of 376
Page 1 of 16 1 2 3 4