Hi, a quick question.. what's the fastest way to retrieve the home dir under windows?
thanx
Printable View
Hi, a quick question.. what's the fastest way to retrieve the home dir under windows?
thanx
;)Code:#include <stdio.h>
int main ( void )
{
FILE *cl = _popen ( "echo %USERPROFILE%", "r" );
char buff[1024];
fgets ( buff, sizeof buff, cl );
printf ( "%s", buff );
_pclose ( cl );
return 0;
}
thanx