reg'系统'功能--- wid一个简单的代码! [英] reg 'system' function--- wid a simple code!
问题描述
你好伙计,
这里我插入非常简单的代码我试图执行..
但仍然得到同样的错误消息,.. "不是enuf记忆
#include< stdlib.h>
#include< stdio.h>
void main(void)
{
int p;
p = system(" time");
if(p< 0)
{
perror(" Error:");
退出(1);
}
}
i也尝试在我的朋友的comp中执行dis代码。 whoz havin double d
记忆
比im havin ..
但仍然有同样的消息。
wat要做什么?
hello folks,
here i m inserting d very simple code tat im trying to execute..
but still gettin d same error msg,.." Not enuf memory"
#include<stdlib.h>
#include<stdio.h>
void main(void)
{
int p;
p=system("time");
if(p<0)
{
perror("Error:");
exit(1);
}
}
i also tried executing dis code in my frd''s comp. whoz havin double d
memory
than im havin..
but still gettin d same msg.
wat to do?
推荐答案
该程序应该可以工作。
The program should work.
Harsh_forC说:
Harsh_forC said:
你好伙计,
这里我插入非常简单的代码,我试图执行..
但仍然得到相同的错误信息,...不是enuf记忆
如果您收到该错误消息,请考虑将您的操作系统替换为由懂英语的人编写的系统。
#include< stdlib.h>
#include< stdio.h>
void main(void)
在那里停下来。 main返回int。如果你将main定义为具有任何其他
返回类型,则C语言完全否定你的程序,并且不会定义会发生什么。
{
int p;
p = system(" time);
if(p< 0)
hello folks,
here i m inserting d very simple code tat im trying to execute..
but still gettin d same error msg,.." Not enuf memory"
If you are getting that error message, consider replacing your operating
system with one written by someone who knows English.
#include<stdlib.h>
#include<stdio.h>
void main(void)
Stop right there. main returns int. If you define main as having any other
return type, the C language disowns your program completely, and does not
define what will happen.
{
int p;
p=system("time");
if(p<0)
system()的返回值的含义取决于实现。
检查文档。
-
Richard Heathfield
Usenet是一个奇怪的地方 - dmr 29/7/1999
http://www.cpax.org.uk
电子邮件:rjh在上面的域名(但显然放弃了www)
The meaning of the return value of system() is implementation-dependent.
Check your documentation.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
Albert说:
Albert said:
程序应该可以工作。
没有理由说它应该。这不是一个有效的C程序。
-
Richard Heathfield
Usenet是一个奇怪的地方 - dmr 29/7/1999
http://www.cpax.org.uk
电子邮件:rjh在上面的域名(但显然放弃了www)
There is no reason why it should. It is not a valid C program.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
这篇关于reg'系统'功能--- wid一个简单的代码!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!