C++ system()函数怎么输入有变量的命令,就像是net user 用户名,用户名等使用者输

2025-05-04 20:27:34
推荐回答(3个)
回答1:

#include
#include
#include 
int main
{
char buf[16];
char cmd[256]="net user ";     
printf(" input user name: ")
scanf("%s"  buf);
system(strcat(cmd,buf));
}

回答2:

system(“els”)是清屏函数吗

回答3:

为什么不直接用shell