How can I have a function to have the current directory in C.
Thx you
Daok
Printable View
How can I have a function to have the current directory in C.
Thx you
Daok
getcurdir
or getdcwd / getcwd in MSVC++ (getcurdir is Borland)
here is what I have made but it doesn't return all file in the folder... how can I have the same thing as when I type dir in the DOS command ?
Code:status = getcurdir(0, cPath);
if (status != 0)
cout << "Erreur dnas l'affichage";
else
{
cout << "Affichage reussite";
gotoxy(37,12);
printf("\\%s", cPath);
}
getch();
I have searched "findfirst" in msdn help in c++ and I have seen only stuff about database ?