AW: [Dev-C++] execution of a string with system()
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Christian W. <Chr...@vo...> - 2002-09-18 14:48:28
|
Hi Simon,
I have done it this way:
#include "stdio.h"
#include "string.h"
#include "stdlib.h"
int main(int argc, char* argv[])
{
char szShellCmd[200];
strnset(szShellCmd, 0, sizeof(szShellCmd));
strcpy(szShellCmd, "dir *.*\0");
system(szShellCmd);
getchar();
return 0;
};
and it works.
Kind r
Christian
|