如何使控制台命令收集数据? [英] How do I make a Console command gather data ?

查看:116
本文介绍了如何使控制台命令收集数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要做的是创建一个允许用户输入名称的程序,在用户输入名称/密码后,使用/ MD命令保存它。我需要帮助这样做,因为我不知道我应该如何编码。我尝试过使用cin>>输入名称>> system(md);,它没有用。该程序打开,并运行完美的np错误或错误,但我想知道如何将其保存为文件夹名称。

What I'm wanting to do is make a program that lets the user type in a name, and after the user types the name/password, it saves it using the /MD command. I need help doing this, as I don't know how I am supposed to code it in. Ive tried using cin >> InputName >> system("md");, and it didnt work. the program opens, and runs perfectly with np errors or bugs, but i want to know how to save it as a folder name.

推荐答案

如果你想创建一个您可以使用C函数的目录 _mkdir [ ^ ]或Windows API函数 CreateDirectory [ ^ ]
If you want to create a directory you can use the C function _mkdir[^] or the Windows API function CreateDirectory[^]


这篇关于如何使控制台命令收集数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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