Thread: check path validity in C99?

  1. #16
    Registered User
    Join Date
    Jun 2011
    Posts
    88
    on line 6 what is the function input() and why are you passing the address of a string constant ?
    on line 7 what is lin ?

  2. #17
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,667
    > Is there a stable standard for it as there is in C?
    The original POSIX standard existed before the first standard for C.

    And like the C standard, it gets tweaked and amended once or twice a decade.
    POSIX - Wikipedia, the free encyclopedia

    Also, you need to separate in your mind the difference between a language and an API.
    The C language consists of keywords like 'for', 'while', and the semantics of things like arrays, pointers, parameter passing etc.

    The standard C library (an API) consists of functions like printf, scanf, strcpy etc.

    The POSIX API consists of things like 'stat', 'mkdir' (and a whole lot more).
    If your program has to deal with user interaction, then relaxing your portability from 'everywhere' to 'POSIX' isn't going to constrain your user base.

    You can always check the manual page for each function to check what standard(s) it conforms to.

    > It seems that this is just another of C99 limitations that I will have to find a work-around for.
    C makes very few assumptions about what should be provided, which is why you can get C compilers for almost any microprocessor, running in almost any environment.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Validity Check.
    By Milo Juak MuTou in forum C++ Programming
    Replies: 3
    Last Post: 04-24-2013, 05:15 AM
  2. Replies: 6
    Last Post: 09-25-2012, 02:57 PM
  3. Check for validity of IP address
    By krishnampkkm in forum Linux Programming
    Replies: 1
    Last Post: 03-25-2010, 05:38 AM
  4. Help! with character validity check
    By Tdankert in forum C Programming
    Replies: 19
    Last Post: 07-30-2007, 08:41 PM
  5. Pointer validity check
    By Carlos in forum Windows Programming
    Replies: 6
    Last Post: 12-11-2003, 03:40 AM