How Does a Program Know Where it is Running?

John J. Boyer director at chpi.org
Sun May 2 21:24:07 UTC 2004


How does a program find out in which directory it resides?  I've tried
argv[0], but if the program is started via a link that just contains she
name of the link.

Thanks,
John

-- 
John J. Boyer; Executive Director, Chief Software Developer
Computers to Help People, Inc.
http://www.chpi.org
825 East Johnson; Madison, WI 53703






More information about the Blinux-list mailing list