【发布时间】:2011-10-05 21:38:33
【问题描述】:
include<stdio.h>
include<stdlib.h>
int main()
{
char a[20]="hello world";
system("./cool.bat a");\\here I need to pass the array as argument to batch file
}
我相信你明白我想说的话。我想将 c 程序的数组作为参数传递给批处理文件。但是如果我说
system("./omnam.bat a") \\ its taking a as an argument
我是怎么做到的?如何将变量或 c 程序数组作为参数发送到批处理文件。假设我在 c 程序中可能有一个整数 I,其值为 15。我如何将它作为参数传递给批处理文件?任何人都可以发布一个带有一些c文件和批处理文件的示例。谢谢
【问题讨论】:
标签: c batch-file system command-line-arguments argument-passing