我正在尝试从另一个程序启动一个程序。
这是下面的代码
图:1
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>
#include<string.h>
int main()
{
printf("Before Execution \n");
system("c:\\Rasmi Personal\\PERSONAL\\C\\Code Block\\C_Test\\bin\\Debug\\C_Test.exe");
printf("\nAfter Execution \n");
return 0;
}
在 c:\Rasmi Personal\PERSONAL\C\Code Block\C_Test\bin\Debug\C_Test 项目中包含的代码是
图 2:
#include <stdio.h>
int main()
{
int x = 10;
while( x --> 0 ) // x goes to 0
{
printf("%d\n", x);
} return 0;
}
但是在执行第一个程序(图 1)时,输出如下所示。
Before Execution
'c:\Rasmi' is not recognized as an internal or external command,
operable program or batch file.
After Execution
请帮我解决这个问题。
PS:- 我在 Windows XP 中使用 CODE::BLOCKS。