Re: командная строка
От: Flamer Кипр http://users.livejournal.com/_flamer_/
Дата: 30.06.04 16:24
Оценка:
Здравствуйте, Аноним, Вы писали:

А>Народ пожалуйста помогите какая ф-ция в C++ реализует ф-ции типа dir и т д (функция('dir',..))?


system

Syntax

#include <stdlib.h>
int system(const char *command);
int _wsystem(const wchar_t *command);

Description

Issues an operating system command.

system invokes the operating system command processor to execute an operating system command, batch file, or other program named by the string command, from inside an executing C program.

To be located and executed, the program must be in the current directory or in one of the directories listed in the PATH string in the environment.

The COMSPEC environment variable is used to find the command processor program file, so that file need not be in the current directory.

Return Value

If command is a NULL pointer, system returns nonzero if a command processor is available.

If command is not a NULL pointer, system returns 0 if the command processor was successfully started.

If an error occurred, a -1 is returned and errno is set to one of the following:

ENOENT Path or file function not found
ENOEXEC Exec format error
ENOMEM Not enough memory

 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.