Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Class unix directory class dirent.h vs20

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

There is no dirent.h under windows to download open source implementation.

Http://www.softagalleria.net/dirent.php

But there is no mkdir in this file

But there are _ mkdir (), so in windows direct.h

Where you don't use mkdir, just include dirent.h.

Where mkdir is used.

Replace with

Int creatDIR (char * path)

{

Int result = 0

# if defined (_ WIN32)

Result = _ mkdir (path)

# else

Result = mkdir (path, 0777); / / notice that 777 is different than 0777

# endif

Return result

}

The _ WIN32 macro is defined as the one already defined by vs, which is 1

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report