C Tutorial/stdlib.h/system — различия между версиями

Материал из C\C++ эксперт
Перейти к: навигация, поиск
м (1 версия: Импорт контента...)
 
м (1 версия: Импорт контента...)
 
(нет различий)

Текущая версия на 13:32, 25 мая 2010

system

Item Value Header file stdlib.h Declaration int system(const char *str); Function passes the string as a command to the command processor. Return zero on success or nonzero on error.

Display the contents of the current working directory in window system:


<source lang="cpp">#include <stdlib.h>

 int main(void)
 {
   printf("%s",system("dir"));
 }</source>