외부파일실행은 어떻게?

panic01의 이미지

C 로 작성중인데여
중간에 외부파일을 실행하려면..
어떤 함수가 있나여?
외부 파일실행되는게 콘솔이 아니라 윈도우로 열리는건데..
어떤함수를 써야하나여?
gcc 사용하고있습니다.

segfault의 이미지

그냥 간단히 system()로 하면 되지 않나요?

panic01의 이미지

제가잘몰라서그러는데..
system 의 인자값들이 머가들어가나여?
stdio.h 선언되있나여?

revizes의 이미지

man system 하니깐..바로 나오는군요..

Quote:
NAME
system - execute a shell command

SYNOPSIS
#include <stdlib.h>

int system(const char *string);

DESCRIPTION
system() executes a command specified in string by calling /bin/sh -c
string, and returns after the command has been completed. During exe-
cution of the command, SIGCHLD will be blocked, and SIGINT and SIGQUIT
will be ignored.

다 덤벼! 다 받아줄께!!