Код: Выделить всё
#include <windows.h>
#include <stdio.h>
void main()
{
char cmd[50];
GetLogicalDriveStrings(50, cmd);
puts(cmd);
}
И всё!!! Хотя у меня еще есть логические диски!A:
Вопрос - чё за косяк???
Модератор: Злобный
Код: Выделить всё
#include <windows.h>
#include <stdio.h>
void main()
{
char cmd[50];
GetLogicalDriveStrings(50, cmd);
puts(cmd);
}
И всё!!! Хотя у меня еще есть логические диски!A:
Код: Выделить всё
void main()
{
char cmd[110];
DWORD a=GetLogicalDriveStrings(110, cmd);
if(a){
for(int i=0;cmd[i];i+=4){
puts(cmd+i);
}
}
}
Код: Выделить всё
char cPath[MAX_PATH];
printf("\nEnter the path ");
gets(cPath);
hFile = FindFirstFile(cPath, &lpfd);
if(hFile == INVALID_HANDLE_VALUE)
{
printf("\"%s\" - No such directory\n", cPath);
main();
}
.......
Код: Выделить всё
FindFirstFile("c:\\*", &lpfd);