Re: c question



On Fri, 4 Jun 1999, Fox, Kevin M wrote:

> Is there a function in c to return the path to the current users home
> directory?
not sure if there is a function to explicitly get it, but there is a
function to get environment variables, and it should be there as $HOME.  
man getenv to be sure, but I think the syntax is:

path=getenv("HOME") where path is a char*

-chris

_______________________________________________________
Christopher Rogers      http://www.pobox.com/~gandalf
gandalf@pobox.com       gandalf@darkcorner.net

This minicourse is like Sex Education 101. We're not saying do not 
overclock your PC, though we strongly advise you not to. But someday
someone is going to tell you how wonderful overclocking is, so you need to
protect yourself and avoid taking unnecessary risks. 
			-Brad Grimes (from a CNN Online Article)






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]