strcmp but with '\n' as the terrminator

Discussion in 'C Programming' started by Allan Bruce, Jul 19, 2003.

  1. Allan Bruce

    Allan Bruce Guest

    Hi there,
    I am reading a file into a char array, and I want to find if a string exists
    in a given line.
    I cant use strcmp since the line ends with '\n' and not '\0'. Is there a
    similar function that will do this, or will I have to write my own?
    Thanks
    Allan
    Allan Bruce, Jul 19, 2003
    #1
    1. Advertising

  2. Allan Bruce wrote:

    > Hi there,
    > I am reading a file into a char array, and I want to find if a string
    > exists in a given line.
    > I cant use strcmp since the line ends with '\n' and not '\0'. Is there a
    > similar function that will do this, or will I have to write my own?


    Assuming that for some strange reason you haven't yet switched over to my
    "stretchy string" routines (which abuse the word "string", since they work
    on non-null-terminated data), the easiest way to do what you want, if the
    "string" is writeable, is to find the \n, change it to \0, do the strstr,
    and then change it back again. If you're doing this a lot, though, you
    should beware, as it's not a very efficient solution; in which case, you'd
    want to write your own, I guess (unless someone has a better idea).

    --
    Richard Heathfield :
    "Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
    C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
    K&R answers, C books, etc: http://users.powernet.co.uk/eton
    Richard Heathfield, Jul 19, 2003
    #2
    1. Advertising

  3. Allan Bruce

    code_wrong Guest

    "Allan Bruce" <> wrote in message
    news:bfbc7r$3ul$2surf.net...
    > Hi there,
    > I am reading a file into a char array, and I want to find if a string

    exists
    > in a given line.
    > I cant use strcmp since the line ends with '\n' and not '\0'. Is there a
    > similar function that will do this, or will I have to write my own?


    If you are looking for a substring in a string you can use
    strstr()

    Syntax:

    #include <string.h>
    char *strstr(const char *s1, const char *s2);

    Description:

    Scans a string for the occurrence of a given substring.

    strstr scans s1 for the first occurrence of the substring s2.

    Return Value

    strstr returns a pointer to the element in s1, where s2 begins (points to s2
    in s1). If s2 does not occur in s1, strstr returns null.

    HTH
    cw
    code_wrong, Jul 19, 2003
    #3
  4. Richard Heathfield wrote:
    > Allan Bruce wrote:
    >
    >
    >>Hi there,
    >>I am reading a file into a char array, and I want to find if a string
    >>exists in a given line.
    >>I cant use strcmp since the line ends with '\n' and not '\0'. Is there a
    >>similar function that will do this, or will I have to write my own?

    >
    >
    > Assuming that for some strange reason you haven't yet switched over to my
    > "stretchy string" routines (which abuse the word "string", since they work
    > on non-null-terminated data), the easiest way to do what you want, if the
    > "string" is writeable, is to find the \n, change it to \0, do the strstr,
    > and then change it back again. If you're doing this a lot, though, you
    > should beware, as it's not a very efficient solution; in which case, you'd
    > want to write your own, I guess (unless someone has a better idea).
    >


    Maybe he can ignore the \n and just use strstr() instead? He won't get
    exact matches for the whole line, but he will "find if a string exists
    in a given line". ;-)


    --
    boa

    libclc home: http://libclc.sourceforge.net
    =?ISO-8859-1?Q?Bj=F8rn_Augestad?=, Jul 19, 2003
    #4
  5. In 'comp.lang.c', "Allan Bruce" <> wrote:

    > I am reading a file into a char array, and I want to find if a string
    > exists in a given line.
    > I cant use strcmp since the line ends with '\n' and not '\0'. Is there
    > a similar function that will do this, or will I have to write my own?


    The usual trick is to remove the '\n' from the read line:

    #include <string.h>

    <...>

    {
    char *p = strchr (line, '\n'); /* search ... */

    if (p)
    {
    *p = 0; /* ... and kill. */
    }
    }

    --
    -ed- [remove YOURBRA before answering me]
    The C-language FAQ: http://www.eskimo.com/~scs/C-faq/top.html
    <blank line>
    FAQ de f.c.l.c : http://www.isty-info.uvsq.fr/~rumeau/fclc/
    Emmanuel Delahaye, Jul 19, 2003
    #5
  6. Allan Bruce

    code_wrong Guest

    "Allan Bruce" <> wrote in message
    news:bfbi8r$6i6$2surf.net...
    >
    > "code_wrong" <> wrote in message
    > news:bfben5$iud$...
    > >
    > > "Allan Bruce" <> wrote in message
    > > news:bfbc7r$3ul$2surf.net...
    > > > Hi there,
    > > > I am reading a file into a char array, and I want to find if a string

    > > exists
    > > > in a given line.
    > > > I cant use strcmp since the line ends with '\n' and not '\0'. Is

    there
    > a
    > > > similar function that will do this, or will I have to write my own?

    > >
    > > If you are looking for a substring in a string you can use
    > > strstr()
    > >
    > > Syntax:
    > >
    > > #include <string.h>
    > > char *strstr(const char *s1, const char *s2);
    > >
    > > Description:
    > >
    > > Scans a string for the occurrence of a given substring.
    > >
    > > strstr scans s1 for the first occurrence of the substring s2.
    > >
    > > Return Value
    > >
    > > strstr returns a pointer to the element in s1, where s2 begins (points

    to
    > s2
    > > in s1). If s2 does not occur in s1, strstr returns null.
    > >
    > > HTH
    > > cw
    > >
    > >

    >
    > I have used strstr mainly, not strcmp as my post indicates! (doh)
    > But the problem is still that strstr requires a null terminator and not
    > '\n'.
    > Any ideas?


    Which function are you using to read your file?
    If you read your file with fgets() then you will get null terminated strings
    to play with.
    Of course there is still the newline character to take into account, but
    that will not matter if you use strstr() to check for substrings.

    cw
    code_wrong, Jul 19, 2003
    #6
  7. Bj[o]rn Augestad wrote:

    > Richard Heathfield wrote: <all snipped>
    >> Allan Bruce wrote:
    >>
    >>
    >>>Hi there,
    >>>I am reading a file into a char array, and I want to find if a string
    >>>exists in a given line.
    >>>I cant use strcmp since the line ends with '\n' and not '\0'.

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    >>>Is there a
    >>>similar function that will do this, or will I have to write my own?

    >>

    <snip>
    >
    > Maybe he can ignore the \n and just use strstr() instead? He won't get
    > exact matches for the whole line, but he will "find if a string exists
    > in a given line". ;-)


    Well, he did say quite clearly that there was no '\0' at the end of the
    data. Or did I misunderstand him?

    --
    Richard Heathfield :
    "Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
    C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
    K&R answers, C books, etc: http://users.powernet.co.uk/eton
    Richard Heathfield, Jul 19, 2003
    #7
  8. Emmanuel Delahaye wrote:

    > In 'comp.lang.c', "Allan Bruce" <> wrote:
    >
    >> I am reading a file into a char array, and I want to find if a string
    >> exists in a given line.
    >> I cant use strcmp since the line ends with '\n' and not '\0'. Is there
    >> a similar function that will do this, or will I have to write my own?

    >
    > The usual trick is to remove the '\n' from the read line:
    >
    > #include <string.h>
    >
    > <...>
    >
    > {
    > char *p = strchr (line, '\n'); /* search ... */


    Undefined behaviour if line has no terminating null character, as the OP has
    pointed out twice now.

    <snip>

    --
    Richard Heathfield :
    "Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
    C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
    K&R answers, C books, etc: http://users.powernet.co.uk/eton
    Richard Heathfield, Jul 19, 2003
    #8
  9. Richard Heathfield wrote:

    > Bj[o]rn Augestad wrote:
    >
    >
    >>Richard Heathfield wrote: <all snipped>
    >>
    >>>Allan Bruce wrote:
    >>>
    >>>
    >>>
    >>>>Hi there,
    >>>>I am reading a file into a char array, and I want to find if a string
    >>>>exists in a given line.
    >>>>I cant use strcmp since the line ends with '\n' and not '\0'.

    >
    > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    >
    >>>>Is there a
    >>>>similar function that will do this, or will I have to write my own?
    >>>

    > <snip>
    >
    >>Maybe he can ignore the \n and just use strstr() instead? He won't get
    >>exact matches for the whole line, but he will "find if a string exists
    >>in a given line". ;-)

    >
    >
    > Well, he did say quite clearly that there was no '\0' at the end of the
    > data. Or did I misunderstand him?
    >


    I don't know. :)

    I was just assuming(I know, I know...) that the OP was reading a file
    line by line using fgets() and then tried to match some string with the
    line read, but ran into problems because of the trailing \n.

    Only time and some source code will tell. ;-)

    --
    boa

    libclc home: http://libclc.sourceforge.net
    =?ISO-8859-1?Q?Bj=F8rn_Augestad?=, Jul 19, 2003
    #9
  10. Allan Bruce

    Allan Bruce Guest

    "Bjørn Augestad" <> wrote in message
    news:RWdSa.3690$...
    > Richard Heathfield wrote:
    >
    > > Bj[o]rn Augestad wrote:
    > >
    > >
    > >>Richard Heathfield wrote: <all snipped>
    > >>
    > >>>Allan Bruce wrote:
    > >>>
    > >>>
    > >>>
    > >>>>Hi there,
    > >>>>I am reading a file into a char array, and I want to find if a string
    > >>>>exists in a given line.
    > >>>>I cant use strcmp since the line ends with '\n' and not '\0'.

    > >
    > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    > >
    > >>>>Is there a
    > >>>>similar function that will do this, or will I have to write my own?
    > >>>

    > > <snip>
    > >
    > >>Maybe he can ignore the \n and just use strstr() instead? He won't get
    > >>exact matches for the whole line, but he will "find if a string exists
    > >>in a given line". ;-)

    > >
    > >
    > > Well, he did say quite clearly that there was no '\0' at the end of the
    > > data. Or did I misunderstand him?
    > >

    >
    > I don't know. :)
    >
    > I was just assuming(I know, I know...) that the OP was reading a file
    > line by line using fgets() and then tried to match some string with the
    > line read, but ran into problems because of the trailing \n.
    >
    > Only time and some source code will tell. ;-)
    >
    > --
    > boa
    >
    > libclc home: http://libclc.sourceforge.net
    >


    I am using this to read the file:
    // find how big the file is
    fseek(fptr, 0, SEEK_END);
    size = ftell(fptr);

    //allocate memory for string
    if ( (contents = new char[size]) == NULL)
    return 0;

    Basically reading it in one big chunk, since I am doing some things to the
    code that take a long time so I wanted to keep the file open for as little
    time as possible.
    I use strstr() to find some matches and also use strcmp() to see if some are
    true for example, a line may be:
    # Material: Porsche_Body
    Now this will be stored with a '\n' at the end but no '\0'.
    In this example I wish to search for "Material:" using strstr() but if it
    doesnt exist then strstr() is causing undefined behaviour. If strstr() is
    successful, then I want to see if the material name matches what I already
    have loaded using strcmp() but since the '\0' isnt there - problems. I
    count how many chars until the '\n' and then use strncmp I suppose, but that
    doesnt get around the strstr() and I want to know for future how to use
    strcmp with '\n' terminator.
    From the gist of it, I should program my own function, or better still
    macro.
    Am I correct?
    Thanks
    Allan
    Allan Bruce, Jul 19, 2003
    #10
  11. Allan Bruce wrote:

    <snip>

    > Now this will be stored with a '\n' at the end but no '\0'.
    > In this example I wish to search for "Material:" using strstr() but if it
    > doesnt exist then strstr() is causing undefined behaviour. If strstr() is
    > successful, then I want to see if the material name matches what I already
    > have loaded using strcmp() but since the '\0' isnt there - problems. I
    > count how many chars until the '\n' and then use strncmp I suppose, but
    > that doesnt get around the strstr() and I want to know for future how to
    > use strcmp with '\n' terminator.
    > From the gist of it, I should program my own function, or better still
    > macro.
    > Am I correct?


    The simplest solution is to ensure that the string is null-terminated, by
    allocating one byte more than you need for the data, and writing a '\0'
    character into that byte.

    --
    Richard Heathfield :
    "Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
    C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
    K&R answers, C books, etc: http://users.powernet.co.uk/eton
    Richard Heathfield, Jul 19, 2003
    #11
  12. "Allan Bruce" <> wrote in message
    news:bfbc7r$3ul$2surf.net...
    > Hi there,
    > I am reading a file into a char array, and I want to find if a string

    exists
    > in a given line.
    > I cant use strcmp since the line ends with '\n' and not '\0'. Is there a
    > similar function that will do this, or will I have to write my own?
    > Thanks
    > Allan


    You can use use strncmp for that, but only if you know how big the total
    buffer is so you know where to stop.
    Serve Laurijssen, Jul 19, 2003
    #12
  13. "Serve Laurijssen" <> wrote in message
    news:bfcc6h$nlo$1.nb.home.nl...
    >
    > "Allan Bruce" <> wrote in message
    > news:bfbc7r$3ul$2surf.net...
    > > Hi there,
    > > I am reading a file into a char array, and I want to find if a string

    > exists
    > > in a given line.
    > > I cant use strcmp since the line ends with '\n' and not '\0'. Is there

    a
    > > similar function that will do this, or will I have to write my own?
    > > Thanks
    > > Allan

    >
    > You can use use strncmp for that, but only if you know how big the total
    > buffer is so you know where to stop.


    ah what the hell, here's some sample code.
    Had a little bit too much whiskey, so trying to find all bugs is left as an
    exercise for you :)

    #include <stdlib.h>
    #include <stdio.h>
    int main(void)

    {

    int i;

    char buf[10] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' };

    char *findstr = "ijk";

    for (i = 0; i <= (sizeof buf / sizeof *buf)-strlen(findstr); i++)

    {

    if (strncmp(buf+i, findstr, 2) == 0)

    printf("%.3s\n", buf+i);

    }

    puts("done");

    return 0;

    }
    Serve Laurijssen, Jul 19, 2003
    #13
  14. Allan Bruce

    Allan Bruce Guest

    "Serve Laurijssen" <> wrote in message
    news:bfcd61$595$1.nb.home.nl...
    >
    > "Serve Laurijssen" <> wrote in message
    > news:bfcc6h$nlo$1.nb.home.nl...
    > >
    > > "Allan Bruce" <> wrote in message
    > > news:bfbc7r$3ul$2surf.net...
    > > > Hi there,
    > > > I am reading a file into a char array, and I want to find if a string

    > > exists
    > > > in a given line.
    > > > I cant use strcmp since the line ends with '\n' and not '\0'. Is

    there
    > a
    > > > similar function that will do this, or will I have to write my own?
    > > > Thanks
    > > > Allan

    > >
    > > You can use use strncmp for that, but only if you know how big the total
    > > buffer is so you know where to stop.

    >
    > ah what the hell, here's some sample code.
    > Had a little bit too much whiskey, so trying to find all bugs is left as

    an
    > exercise for you :)
    >
    > #include <stdlib.h>
    > #include <stdio.h>
    > int main(void)
    >
    > {
    >
    > int i;
    >
    > char buf[10] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j' };
    >
    > char *findstr = "ijk";
    >
    > for (i = 0; i <= (sizeof buf / sizeof *buf)-strlen(findstr); i++)
    >
    > {
    >
    > if (strncmp(buf+i, findstr, 2) == 0)
    >
    > printf("%.3s\n", buf+i);
    >
    > }
    >
    > puts("done");
    >
    > return 0;
    >
    > }
    >
    >


    Thanks, will have a look.
    I have to say one thing though, I hope you are drinking Scotch since it is
    the best, but I may be biassed, but if you are its spelt whisky. Only the
    Irish could spell it differently! (Sorry to my Irish mates...)
    Allan
    Allan Bruce, Jul 19, 2003
    #14
  15. In 'comp.lang.c', "Allan Bruce" <> wrote:

    > I have to say one thing though, I hope you are drinking Scotch since it is
    > the best, but I may be biassed, but if you are its spelt whisky. Only the


    best what? Do you mean pure malt? Forget those blended piece of shit.

    > Irish could spell it differently! (Sorry to my Irish mates...)


    What the hell? Do you meant whiskey? The Whiskey!

    --
    -ed- [remove YOURBRA before answering me]
    The C-language FAQ: http://www.eskimo.com/~scs/C-faq/top.html
    <blank line>
    FAQ de f.c.l.c : http://www.isty-info.uvsq.fr/~rumeau/fclc/
    Emmanuel Delahaye, Jul 19, 2003
    #15
  16. Allan Bruce

    Allan Bruce Guest

    "Emmanuel Delahaye" <> wrote in message
    news:Xns93BEF22881hsnoservernet@130.133.1.4...
    > In 'comp.lang.c', "Allan Bruce" <> wrote:
    >
    > > I have to say one thing though, I hope you are drinking Scotch since it

    is
    > > the best, but I may be biassed, but if you are its spelt whisky. Only

    the
    >
    > best what? Do you mean pure malt? Forget those blended piece of shit.
    >
    > > Irish could spell it differently! (Sorry to my Irish mates...)

    >
    > What the hell? Do you meant whiskey? The Whiskey!
    >
    > --
    > -ed- [remove YOURBRA before answering me]
    > The C-language FAQ: http://www.eskimo.com/~scs/C-faq/top.html
    > <blank line>
    > FAQ de f.c.l.c : http://www.isty-info.uvsq.fr/~rumeau/fclc/


    I do mean single malt, I am an Islay man, so I prefer Ardbeg, Laphroaig and
    Lagavulin, and they are all spelt whisky! not whiskey! I am Scottish and
    take pride in my whisky, not the Irish variety which generally tastes like
    cats pee, sorry Bushmills but it does.
    Allan
    Allan Bruce, Jul 20, 2003
    #16
  17. Allan Bruce

    Chris Torek Guest

    In article <bfbc7r$3ul$2surf.net>
    Allan Bruce <> writes:
    >I [have an entire, probably large] file [in] a char array, and I want
    >to find if a string exists in a given line.


    Elsethread, you note you mean "strstr", not "strcmp".

    I suspect (per insertion above and given some guesses as to what
    you are doing) that you want to check a relatively large number
    of lines as well, not just one specific line.

    If the file is large and the number of lines is large, you may find
    it worthwhile to implement a Boyer-Moore search. By writing your
    own, you can choose any sort of termination conditions you like,
    including stopping at newlines.

    Boyer-Moore is, in the ideal case, O(N/M) where N is the length of
    the search space -- in this case, some presuambly large number of
    lines -- and M is the length of the string to be found. It has
    some overhead setup that makes it a bad idea unless N is noticeably
    larger than M. Since strstr() does not get much information, and
    C strings are generally short, strstr() is unlikely to use Boyer-Moore
    -- but you know more about what you are searching, so you can.
    --
    In-Real-Life: Chris Torek, Wind River Systems (BSD engineering)
    Salt Lake City, UT, USA (40°39.22'N, 111°50.29'W) +1 801 277 2603
    email: forget about it http://67.40.109.61/torek/index.html (for the moment)
    Reading email is like searching for food in the garbage, thanks to spammers.
    Chris Torek, Jul 20, 2003
    #17
  18. On Sat, 19 Jul 2003 12:08:42 -0400, Allan Bruce wrote:
    > I am using this to read the file:
    > // find how big the file is
    > fseek(fptr, 0, SEEK_END);
    > size = ftell(fptr);
    >
    > //allocate memory for string
    > if ( (contents = new char[size]) == NULL)
    > return 0;
    >
    > Basically reading it in one big chunk, since I am doing some things to
    > the code that take a long time so I wanted to keep the file open for as
    > little time as possible.
    > I use strstr() to find some matches and also use strcmp() to see if some
    > are true for example, a line may be:
    >
    > # Material: Porsche_Body
    >
    > Now this will be stored with a '\n' at the end but no '\0'. In this
    > example I wish to search for "Material:" using strstr() but if it doesnt


    I find the best way to parse stuff like this is to use a little "State
    Machine" which in this context is just a loop with a switch like:

    int ch, state = 0;

    while ((ch = fgetc(in)) != EOF) {
    switch (state) {
    case 0:
    if (ch == '#') {
    state = 1;
    }
    break;
    case 1:
    if (isspace(ch)) {
    break;
    }
    state = 2;
    case 2:
    if (ch == ':') {
    ident[i++] = '\0'; /* Material */
    state = 3;
    break;
    }
    ident[i++] = ch;
    break;
    case 3:
    if (isspace(ch)) {
    break;
    }
    state = 4;
    case VALUE:
    if (ch == '\r' || ch == '\n') {
    value[v++] = '\0'; /* Porsche_Body */
    state = 0;
    break;
    }
    value[v++] = ch;
    }
    }

    The advantage in doing this is that it tends to scale a lot better. As
    your file format changes or if you encounter content that you previously
    thought you would never need to parse you can refactor easily without
    the code growing exponentially more complex. For example if you suddenly
    started getting files that had identifiers (e.g. Material) without values
    you could add a test for '\r' and '\n' in case 3 to make value[0] =
    '\0' and reset the state to 0.

    This is all very crudely described of course. You would need to adjust
    the technique to your needs.

    Mike
    Michael B Allen, Jul 20, 2003
    #18
  19. Allan Bruce <> scribbled the following:
    > "Emmanuel Delahaye" <> wrote in message
    > news:Xns93BEF22881hsnoservernet@130.133.1.4...
    >> In 'comp.lang.c', "Allan Bruce" <> wrote:
    >> > I have to say one thing though, I hope you are drinking Scotch since it

    > is
    >> > the best, but I may be biassed, but if you are its spelt whisky. Only

    > the
    >>
    >> best what? Do you mean pure malt? Forget those blended piece of shit.
    >>
    >> > Irish could spell it differently! (Sorry to my Irish mates...)

    >>
    >> What the hell? Do you meant whiskey? The Whiskey!


    > I do mean single malt, I am an Islay man, so I prefer Ardbeg, Laphroaig and
    > Lagavulin, and they are all spelt whisky! not whiskey! I am Scottish and
    > take pride in my whisky, not the Irish variety which generally tastes like
    > cats pee, sorry Bushmills but it does.


    The malt is spoiled by the too high alcohol content. It ends up tasting
    like alcohol. If you like malt, drink beer.

    --
    /-- Joona Palaste () ---------------------------\
    | Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
    | http://www.helsinki.fi/~palaste W++ B OP+ |
    \----------------------------------------- Finland rules! ------------/
    "Immanuel Kant but Genghis Khan."
    - The Official Graffitist's Handbook
    Joona I Palaste, Jul 20, 2003
    #19
  20. Emmanuel Delahaye wrote:

    <snip>

    > Forget those blended piece of shit.


    Was this entirely necessary? This /is/ a technical newsgroup, after all.

    I'd hate to have to plonk you.

    --
    Richard Heathfield :
    "Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
    C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
    K&R answers, C books, etc: http://users.powernet.co.uk/eton
    Richard Heathfield, Jul 20, 2003
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shane Peck

    strcmp problem

    Shane Peck, Sep 19, 2003, in forum: C++
    Replies:
    6
    Views:
    2,356
    Kevin Goodsell
    Sep 22, 2003
  2. muser

    strcmp

    muser, Oct 3, 2003, in forum: C++
    Replies:
    6
    Views:
    1,115
    Frank Schmitt
    Oct 9, 2003
  3. Andrej Hocevar

    please help with strcmp()

    Andrej Hocevar, Jul 19, 2003, in forum: C Programming
    Replies:
    3
    Views:
    326
    Gordon Burditt
    Jul 19, 2003
  4. Robert Mens

    segfault when strcmp

    Robert Mens, Oct 22, 2003, in forum: C Programming
    Replies:
    6
    Views:
    577
    Peter Nilsson
    Oct 23, 2003
  5. Eirik

    strcmp() And if

    Eirik, Dec 13, 2003, in forum: C Programming
    Replies:
    11
    Views:
    759
    Lew Pitcher
    Dec 17, 2003
Loading...

Share This Page