如何使用日期在C语言中创建目录 [英] How to create a directory in C language with date

查看:76
本文介绍了如何使用日期在C语言中创建目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你应该描述我,因为我已经尝试了很多方法,我找不到解决方案,创建的目录应该在创建目录功能。



我是什么尝试过:



不,我尝试了很多方法而无法找到解决方案

我想制作一个目录日期作为文件夹名称与创建目录函数

解决方案

它将取决于您的编译器系统,但它应该是 mkdir function [ ^ ]



要指定日期作为目录名称,你需要 strftime功能 [ ^ ],可能有格式字符串如

  %Y-%m - %d 


you should describe me because I have tried many ways I cant find the solution and the directory created should be in Create Directory function.

What I have tried:

No, I have tried many ways and I cant find the solution
I want to make a directory with date as folder name with create Directory function

解决方案

It's going to depend on your compiler system, but it should be the mkdir function[^] you need.

To specify a date as the directory name name, you need the strftime function[^], probably with a format string like

"%Y-%m-%d"


这篇关于如何使用日期在C语言中创建目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆