Search:

Type: Posts; User: lowestOne

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    1,600

    $ od -x file3.txt od (Unix) - Wikipedia, the...

    $ od -x file3.txt

    od (Unix) - Wikipedia, the free encyclopedia
  2. Replies
    3
    Views
    2,035

    Here is a way that is not recursive: #include...

    Here is a way that is not recursive:

    #include <stdio.h>

    int main (int argc, char **argv)
    {
    unsigned int previous01 = 0;
    unsigned int previous02 = 1;
    unsigned int current =...
  3. Create FILE* from char buffer (or perhaps another idea)

    Hi all. I am a C beginner here. I've been using libpng to open png files.

    I hope to eventually have one file that has more than one png in it (compressed or not), call it the main file.

    Is it...
  4. Replies
    32
    Views
    4,037

    That makes myStrlen() a little cooler, though I...

    That makes myStrlen() a little cooler, though I am a little afraid to post code now :)

    unsigned int myStrlen(const char* str)
    {
    return *str? 1 + myStrlen(++str): 0;
    }
  5. Replies
    32
    Views
    4,037

    It does a little. Maybe it is useful, like the...

    It does a little. Maybe it is useful, like the index of the array where they are not equal or something.



    Sorry, if the < operator was overloaded to properly deal with a c-string.


    ...
  6. Replies
    32
    Views
    4,037

    I did mistake LaserLight's quick return as the...

    I did mistake LaserLight's quick return as the entire contents of the strcmp function, and also that it was about the char array.

    If x and y are char arrays, then
    return (x > y) - (x < y); is a...
  7. Replies
    32
    Views
    4,037

    I made no claims that my way was better than the...

    I made no claims that my way was better than the official strcmp...
  8. Replies
    32
    Views
    4,037

    Disposition aside, I am very much interested. ...

    Disposition aside, I am very much interested. Thanks for the help. It's a shame that my actual interest, the actual implementation of strcmp, was set aside for what could go wrong with the code...
  9. Replies
    32
    Views
    4,037

    Somehow you all missed the point of this thread. ...

    Somehow you all missed the point of this thread. I guess that's what could be expected from a site who's only purpose is to sell a book
  10. Replies
    32
    Views
    4,037

    The examples in post 6 have the computer...

    The examples in post 6 have the computer performing the comparison twice. Also opens up the question of what the < operator is doing.

    I was able to find this LINK, which does show the source for...
  11. Replies
    32
    Views
    4,037

    Here is my deal, I've taken intermediate C++ and...

    Here is my deal, I've taken intermediate C++ and JAVA and now I'm taking beginner C. In class we're learning about things like "what is an array" and the scope of variables. Some things are...
  12. Replies
    32
    Views
    4,037

    That's what I just did. Thinking about it...

    That's what I just did. Thinking about it though, I guess it could be a bitwise subtraction. I would highly doubt it's a nested if statement. The only tough part is figuring out the four zeros to...
  13. Replies
    32
    Views
    4,037

    The sign of the char makes no difference, a...

    The sign of the char makes no difference, a signed int is returned. Furthermore, of course it's in a loop, that's how I get to i in the first place.



    int myStrcmp(const char* str1, const char*...
  14. Replies
    32
    Views
    4,037

    strcmp question

    Here is the explanation for strcmp(), I've highlighted my focus:

    Explanation: Tests the strings for equality. Returns a negative number if string1 is less than string2, returns zero if the two...
Results 1 to 14 of 14