C++自动生成设计资料目录

#include <iostream>
using namespace std;

int main()
{
    string folderPath1 = ".\\设计资料\\BOM"; 
    string folderPath2 = ".\\设计资料\\gerber"; 
    string folderPath3 = ".\\设计资料\\silk"; 

    string command;
    command = "mkdir " + folderPath1;  
    system(command.c_str());
    command = "mkdir " + folderPath2;  
    system(command.c_str());
    command = "mkdir " + folderPath3;  
    system(command.c_str());

    return 0;
}

总是记不住标准的工程目录结构,就用C++写了一个小程序,用来在当前目录下生成工程目录结构,很简单的几段代码。

发生过生成的中文目录乱码的问题,在VsCode中选在以“Simplified Chinese(GBK)”即可。

 

参考:

https://blog.csdn.net/sinat_41104353/article/details/83149441

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值