Menu

Dev C++ & 'strncasecmp' question

2003-02-13
2012-09-26
  • Nobody/Anonymous

    I installed Dev C++ v4.9.7.0 on Windows ME &

    I experience the following problem:

    I would like to know what this does:

    if (strncasecmp(p->firstName, fname, n)==0)

    I have 4 Questions:

    1. I know it compares the length of the 2 first
        words, but what does the third argument " n ",
        represent?
    2. And what about the outcome?
        True = 1 & False = 0 ?
    3. Does DevC++ support the use of strncasecmp?
        And if yes, what library do I need to load?
        Is it #include <string.h>?
    4. Is there an internet site or address that gives
        a list of all the libraries & the functions that
       each library loads in Dev C++?

    I appreciate for your help, thanks!

     
    • Nobody/Anonymous

      Dev-C++ is an IDE (a visual interface) to the GCC compiler ported to windows environment by the MingW project.

      GCC (GNU Compiler Coolection)
      http://gcc.gnu.org

      MingW
      www.mingw.org

      That said, yes, mingw supports strncasecmp. The correct header is string.h. How do i know that?
      (Open a dos box)
      cd \
      cd %Your MingW\include dir%
      grep strncasecmp *

      And I got:
      string.h:strncasecmp (const char * __sz1, const char * __sz2, size_t __sizeMaxCompare)

      There it is :)

      /Effenberg

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.