求system.h这个C语言头文件.
答案:1 悬赏:60 手机版
解决时间 2021-02-24 19:13
- 提问者网友:捧腹剧
- 2021-02-24 06:13
如题,在TC里面没有找到,有没有下的.
最佳答案
- 五星知识达人网友:归鹤鸣
- 2021-02-24 06:46
#include <cruntime.h>
#include <process.h>
#include <io.h>
#include <stdlib.h>
#include <errno.h>
#include <tchar.h>
#include <dbgint.h>int __cdecl _tsystem (
const _TSCHAR *command
)
{
int catch;
_TSCHAR *argv[4]; argv[0] = _tgetenv(_T("COMSPEC")); if (command == NULL) {
return argv[0] == NULL ? 0 : (!_taccess(argv[0],0));
} _ASSERTE(*command != _T('\0')); argv[1] = _T("/c");
argv[2] = (_TSCHAR *) command;
argv[3] = NULL; if (argv[0])
if ((catch = _tspawnve(_P_WAIT,argv[0],argv,NULL)) != -1
|| (errno != ENOENT && errno != EACCES))
return(catch);
argv[0] = ( _osver & 0x8000 ) ? _T("command.com") : _T("cmd.exe"); return(_tspawnvpe(_P_WAIT,argv[0],argv,NULL));
}
标准库源代码里的system.c不知道你是不是找这个
#include <process.h>
#include <io.h>
#include <stdlib.h>
#include <errno.h>
#include <tchar.h>
#include <dbgint.h>int __cdecl _tsystem (
const _TSCHAR *command
)
{
int catch;
_TSCHAR *argv[4]; argv[0] = _tgetenv(_T("COMSPEC")); if (command == NULL) {
return argv[0] == NULL ? 0 : (!_taccess(argv[0],0));
} _ASSERTE(*command != _T('\0')); argv[1] = _T("/c");
argv[2] = (_TSCHAR *) command;
argv[3] = NULL; if (argv[0])
if ((catch = _tspawnve(_P_WAIT,argv[0],argv,NULL)) != -1
|| (errno != ENOENT && errno != EACCES))
return(catch);
argv[0] = ( _osver & 0x8000 ) ? _T("command.com") : _T("cmd.exe"); return(_tspawnvpe(_P_WAIT,argv[0],argv,NULL));
}
标准库源代码里的system.c不知道你是不是找这个
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯