プログラミングのお題スレ Part17at TECH
プログラミングのお題スレ Part17 - 暇つぶし2ch626:デフォルトの名無しさん
20/05/29 19:46:09 Yyjc625Z.net
>>603 C++ Windows

#include <Windows.h>
#include <iostream>

int main()
{
auto drives = GetLogicalDrives();
for (int i = 0; i < 32; ++i) {
if (drives & (1 << i)) {
char directory[] = "A:";
directory[0] += i;
ULARGE_INTEGER freeBytes;
if (GetDiskFreeSpaceExA(directory, nullptr, nullptr, &freeBytes) != 0) {
std::cout << directory << " " << freeBytes.QuadPart << std::endl;
}
}
}
}


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch