编程问题: C++里怎么调用cmd 并在cmd里执行操作

执行的操作比如:要创建一个文本文件打开一个文本文件
2025-03-04 15:20:45
推荐回答(1个)
回答1:

使用system命令,如:
system("copy > text.txt");
建立空白的text.txt
system("notepad.exe text.txt");
就是使用notepad打开 text.txt 文件