如何在Borland C ++中停止控制台应用程序 [英] how stop console application in Borland C++

查看:119
本文介绍了如何在Borland C ++中停止控制台应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何停止在Borland C ++中的控制台应用程序保持更多的时间?


当我启动控制台应用程序时,控制台仅保持在前1秒..

解决方案



" PHP2" < gp@nospm.hr>在消息新闻中写道:bp ********** @ ls219.htnet.hr ...

如何停止在Borland C ++中的控制台应用程序保持更长的时间?

当我启动控制台应用程序时,控制台只停留在前1秒..




如果我理解正确那么


系统(暂停);


可能就是你所追求的。这将使控制台出现,直到

用户按下一个键。我认为这只适用于我猜的窗户

就是你所追求的。

如果这不是你所需要的,那么或许更好的描述是

需要。

Allan


我试试:


//我的第一个C ++程序


#include< iostream.h>


int main()

{

cout<< Hello World!;

返回0;

系统(暂停);

}

但这不是在win2000中的暂停命令提示窗口


" Allan Bruce" <人***** @ TAKEAWAYf2s.com>在消息中写道

news:bp ********** @ news.freedom2surf.net ...


" PHP2" < gp@nospm.hr>在消息新闻中写道:bp ********** @ ls219.htnet.hr ...

如何停止在Borland C ++中的控制台应用程序保持更长的时间?

当我启动控制台应用程序时,控制台只能在前1秒停留...

如果我理解正确,那么系统(暂停);

可能就是你追求的目标。这将使控制台出现,直到
用户按下一个键。我认为这只适用于Windows我



猜你是你想要的。
如果这不是你需要的,那么也许更好的描述是
必需。
Allan





" PHP2" < gp@nospm.hr>写在留言新闻:bp ********** @ ls219.htnet.hr ...

我试试:

//我的第一个节目用C ++

#include< iostream.h>

int main()
{
cout<< Hello World!;
返回0;
系统(暂停);
}

但这不是win2000中的暂停命令提示符窗口




您需要在

系统(暂停);

>
返回0;

我会留给你研究它为什么会这样。

Allan


how stop console application in Borland C++ that stay on top more time?

when I start console aplication, console stay on top 1 seconds only..

解决方案


"PHP2" <gp@nospm.hr> wrote in message news:bp**********@ls219.htnet.hr...

how stop console application in Borland C++ that stay on top more time?

when I start console aplication, console stay on top 1 seconds only..



If I understand you correctly then

system("pause");

may be what you are after. This will make the ''console'' appear until the
user presses a key. I think this works only in windows which I am guessing
is what you are after.
If this is not what you require, then perhaps a better description is
required.
Allan


I am try :

// my first program in C++

#include <iostream.h>

int main ()
{
cout << "Hello World!";
return 0;
system("pause");
}
but this was NOT pause command prompt window in win2000

"Allan Bruce" <al*****@TAKEAWAYf2s.com> wrote in message
news:bp**********@news.freedom2surf.net...


"PHP2" <gp@nospm.hr> wrote in message news:bp**********@ls219.htnet.hr...

how stop console application in Borland C++ that stay on top more time?

when I start console aplication, console stay on top 1 seconds only..
If I understand you correctly then

system("pause");

may be what you are after. This will make the ''console'' appear until the
user presses a key. I think this works only in windows which I am


guessing is what you are after.
If this is not what you require, then perhaps a better description is
required.
Allan




"PHP2" <gp@nospm.hr> wrote in message news:bp**********@ls219.htnet.hr...

I am try :

// my first program in C++

#include <iostream.h>

int main ()
{
cout << "Hello World!";
return 0;
system("pause");
}
but this was NOT pause command prompt window in win2000



you need to place the
system("pause");
before the
return 0;
I will leave it up to you to research it as to why this is the case.
Allan


这篇关于如何在Borland C ++中停止控制台应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆