바로가기메뉴
본문 바로가기
메뉴 바로가기

자료실 > 유머게시판


게시물을 뉴스나 다른 곳에서 인용하실 때에는 반드시 보배드림 출처를 밝혀주시기 바랍니다.
글쓰기 수정 삭제 목록
  • 댓글 (1) |
  • 내 댓글 보기 |
  • 레벨 소위 1 개쪽바리제거팀 24.06.16 20:18 답글 신고
    위 인공지능 AI가 만든 , 어이없고 존재 값어치 1도 없는 코드 ㅋㅋㅋ


    #include <iostream>
    #include <filesystem>
    #include <string>

    int main() {
    std::filesystem::path filePath = "mybeep.exe";

    if (std::filesystem::exists(filePath)) {
    std::string diskType;
    std::filesystem::file_status status = std::filesystem::status(filePath);

    switch (status.type()) {
    case std::filesystem::file_type::directory:
    diskType = "Directory";
    break;
    case std::filesystem::file_type::regular:
    // Check disk type based on the file path
    if (filePath.string().find("C:") == 0) {
    diskType = "SATA";
    } else if (filePath.string().find("D:") == 0) {
    diskType = "SATA";
    } else if (filePath.string().find("E:") == 0) {
    diskType = "USB 2.0";
    } else if (filePath.string().find("F:") == 0) {
    diskType = "USB 3.0";
    } else if (filePath.string().find("G:") == 0) {
    diskType = "SD Card";
    } else {
    diskType = "Unknown";
    }
    break;
    default:
    diskType = "Unknown";
    break;
    }

    std::cout << "File exists on a " << diskType << " device." << std::endl;
    } else {
    std::cout << "File does not exist." << std::endl;
    }

    return 0;
    }

덧글입력

0/2000

글쓰기
검색 맨위로 내가쓴글/댓글보기
공지사항
t서비스전체보기
사이버매장
국산차매장
수입차매장
튜닝카매장
승용차매장
스포츠카매장
RV/SUV매장
밴/승합차매장
오토갤러리매장
국산중고차
전체차량
인기차량
확인차량
특수/특장차
국산차매장
중고차시세
차종별검색
수입중고차
전체차량
인기차량
확인차량
특수/특장차
수입차매장
중고차시세
차종별검색
내차팔기
사이버매물등록
국산차등록
수입차등록
매물등록권 구입
게시판
베스트글
자유게시판
보배드림 이야기
시승기
자료실
내차사진
자동차동영상
자동차사진/동영상
레이싱모델
주요서비스
오토바이
이벤트