Thread: error PATH_MAX was not declared in this scope

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    192

    error PATH_MAX was not declared in this scope

    So basically I get this error

    error: PATH_MAX was not declared in this scope
    error: cwd was not declared in this scope

    in a file is there an include Im missing to get rid of the error like

    #include <cstring> ...... or something

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    They would probably have to exist in order for you to use them. Since they don't....

    (There is a FILENAME_MAX in <cstdio>, and POSIX has a getcwd.)

    EDIT: Keeping in mind the Linux natures of previous questions, then I believe there is a PATH_MAX also in <unistd.h>.
    Last edited by tabstop; 04-02-2010 at 06:28 PM.

  3. #3
    Registered User
    Join Date
    Aug 2009
    Posts
    192
    NVM sorry didnt post teh asnwer they exist in
    limits.h

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. xy was not declared in this scope: compiler error!
    By twilight in forum C++ Programming
    Replies: 41
    Last Post: 08-13-2009, 12:33 PM
  2. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  3. <Gulp>
    By kryptkat in forum Windows Programming
    Replies: 7
    Last Post: 01-14-2006, 01:03 PM
  4. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM
  5. Nested loop frustration
    By caroundw5h in forum C Programming
    Replies: 14
    Last Post: 03-15-2004, 09:45 PM