小编Joh*_*ara的帖子

如何在C程序中运行cmd命令

我似乎无法弄清楚如何在 C 程序中运行 cmd 程序。

这是我的代码:

#include <stdio.h>
#include <stdlib.h>
int main()
{
    char educode[100];
    printf("Welcome To ACE-IT Edu Software!\n");
    printf("\nPlease Type An Educator Code and then press enter.");
    printf("\nEducator Code: ");
    gets(educode);
    if(educode == 5678){
        system("mkdir test");
    } else {
    printf("\nSorry, thats not a valid Educator Code. To buy an Educator Code, go to https://www.ace-it.edu");
    }


    return 0;
}
Run Code Online (Sandbox Code Playgroud)

c

1
推荐指数
1
解决办法
2万
查看次数

标签 统计

c ×1