SHELL
C語言調用控制台程序(exe)文件使用system函數 ,函數原型為
int system( const char *command );
輸入使用輸入輸出重定向。下面是用VC6.0寫的一個簡單的例子。
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdlib.h>
void main(void)
{
system("Schedul.exe > 1.txt");
system("type 1.txt");
}
{
system("Schedul.exe > 1.txt");
system("type 1.txt");
}
晚上10:16 | | 0 Comments
訂閱:
文章 (Atom)
追蹤者
技術提供:Blogger.