CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2009
    Posts
    23

    Directory variables

    Is there any variables in C++ like working_directory or program_directory?

  2. #2
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: Directory variables

    No. Do you need this under Windows or Linux? For Windows look for GetWorkingDirectory() and GetModuleFileName().
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

  3. #3
    Join Date
    Feb 2009
    Posts
    23

    Re: Directory variables

    Well, actually I just want to make a string that contains the path where the executable is located.

  4. #4
    Join Date
    Jun 2002
    Location
    Colorado, U.S.A.
    Posts
    980

    Re: Directory variables

    The first command line argument passed to main is the path to the executable.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured