Search:

Type: Posts; User: Sir Galahad

Page 1 of 7 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    231

    It's a command-line application that processes...

    It's a command-line application that processes text files. Couldn't have been written in pure C, eh?
  2. Replies
    7
    Views
    231

    Short list: (1) How can one know for sure...

    Short list:

    (1) How can one know for sure that it doesn't contain any malware? Users have a right to know what they're running on their computers.

    (2) What happens if a bug is found? Just...
  3. Replies
    7
    Views
    231

    The project linked only provides a binary. No...

    The project linked only provides a binary. No source, no thanks!
  4. Fair point. And to be honest, that's exactly why...

    Fair point. And to be honest, that's exactly why I still use CHAR_BIT anyhow. It's self-documenting.
  5. In this day and age, I wouldn't even bother. No...

    In this day and age, I wouldn't even bother. No sane vendor would define CHAR_BIT as anything other than 8.
  6. Pretty sure 8 * sizeof(int) works equally well on...

    Pretty sure 8 * sizeof(int) works equally well on all systems.
  7. Yep. Good catch.

    Yep. Good catch.
  8. Loop I = 0 to length Set REPEATS counter to...

    Loop I = 0 to length
    Set REPEATS counter to zero
    Loop J = I + 1 to length
    If data at J equals data at I
    Increment REPEATS
    Otherwise
    Exit inner loop
    If REPEATS is greater than...
  9. Replies
    13
    Views
    310

    Or maybe just make the comparison a macro and let...

    Or maybe just make the comparison a macro and let the user define the function. Might make things a little clearer anyway:





    #include <stdlib.h>

    #define SORT(array, length, compare)\...
  10. How could you? It doesn't even compile!

    How could you? It doesn't even compile!
  11. Replies
    12
    Views
    384

    If you want a concise answer then I suggest you...

    If you want a concise answer then I suggest you start by creating a simple and COMPLETE program demonstrating where you're at on the problem. Because as things stand it's a kind of unclear (to me at...
  12. Maybe gcc for z/OS...

    Maybe gcc for z/OS?
  13. It's nice to be helpful, but remember, this is a...

    It's nice to be helpful, but remember, this is a homework assignment...
  14. int isOdd(int value) { return value % 2 == 0;...

    int isOdd(int value)
    {
    return value % 2 == 0;
    }


    Now loop through your numbers and increment a counter if the test passes.
  15. Replies
    1
    Views
    150

    Funny thing is just how prevalent MD5 is out in...

    Funny thing is just how prevalent MD5 is out in the wild, even after so many years of being exposed as completely broken. This library, for example, is a dependency of a whopping 150000+ repos. Wow!
  16. Replies
    55
    Views
    2,607

    Have you verified that the file exists on your...

    Have you verified that the file exists on your computer? If not, you may need the Windows equivalent of the Linux libwxgtk-dev package (see here). If you do however find it, then just be sure to add...
  17. Replies
    5
    Views
    421

    Nice thing about C is it hasn't changed much over...

    Nice thing about C is it hasn't changed much over the years. C++ on the other hand, the newer stuff is hardly recognizable IMHO.
  18. Replies
    5
    Views
    421

    You think that's bad. My C++ harkens back to the...

    You think that's bad. My C++ harkens back to the Jurassic period!
  19. Replies
    6
    Views
    382

    @Malcolm McLean...

    @Malcolm McLean Nice set of utilities!
  20. Replies
    6
    Views
    382

    Nope, looks like a 404. ...

    Nope, looks like a 404.


    galahad@cmc563:~/tmp$ git clone https://github.com/MalcolmMcLean/babyx
    Cloning into 'babyx'...
    remote: Enumerating objects: 89, done.
    remote: Counting objects: 100%...
  21. Replies
    5
    Views
    421

    Try to use functions whenever possible. Also,...

    Try to use functions whenever possible. Also, scanf and fgets don't play well together. Better to use sscanf instead.



    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>

    char*...
  22. The code is incorrect, that's why. You need to...

    The code is incorrect, that's why. You need to ensure that the index is less than `argc`. Period.
  23. Replies
    8
    Views
    318

    Oh okay. Kind of annoying that a compiler would...

    Oh okay. Kind of annoying that a compiler would support an extension by default though. Code would be way more portable if that sort of thing would raise an error/warning instead.
  24. Replies
    8
    Views
    318

    The code at the bottom is my signature. And both...

    The code at the bottom is my signature. And both compile just fine (tested with gcc and clang on linux).
  25. Replies
    8
    Views
    318

    No? int main(void) { int $ = 0; }

    No?



    int main(void)
    {
    int $ = 0;
    }
Results 1 to 25 of 155
Page 1 of 7 1 2 3 4