刚开始 [英] just started
问题描述
刚开始自学C ++程序设计......我已经非常感兴趣了b / b现在对计算机感兴趣了一段时间并且有一个nac左右我想
想到的他们是如何工作的...硬件我很好......我可以理解并撕下它并重建它......芯片板I / O等
等...编程是一个不同的野兽...
所以我在玩C并编译一个小的.exe文件与
Miracle C ..简单的说,我的名字是等等...但是我
注意到它在dos窗口中加载...为什么不加载
a .txt文件?我的主要问题是这个...在你运行test.exe
之后它会闪烁打开DOS窗口并快速关闭......现在我这个我想知道...我有我的MCE,我接受过Windows XP技术培训
支持...我知道退出时关闭命令被检查对于
应用程序而且我知道只需打开默认属性并选择
选中复选框...
我的问题是......在C或C ++中是否有办法将其写入
我制作的test.exe只显示我的名字是......
这是我的全新内容,不知道该往哪里去......我没有看到任何对交换机的引用或执行任何内容图书馆
文件... stdio.h或stdlib.h ...我不知道我在哪里可以说
目录是C:\ windir
程序是C:\ windir \ default
程序有属性选项卡
属性选项卡有杂项,等等...
misc标签有一个选项关闭退出
关闭退出应该是假的
我真的不知道......我甚至不知道是否可能......也许
它更好只是注意它并保存批处理文件...
任何想法?或者我是基地的方式? :)!
Just started to teach myself C C++ programming... I have been very
interested with computers for a while now and have a nac or so I
thought for how they work ... hardware I am ok with ... I can
understand and tear it down and rebuild it ... chips boards I/O etc
etc ... programing is a different beast ...
So I am fooling around with C and compile a small .exe file with
Miracle C ... simple thing that said Hi my name is etc etc ... but I
noticed that it loads in a dos window ... Why doesn''t it load in
a .txt file ? My main question is this ... after you run the test.exe
it flashes open the DOS window and closes quickly ... now this I
understand ... I do have my MCE and I am trained in Windows XP tech
support ... I know that a "close on exit" command is "checked" for the
application and I know to just open the default properties and de-
select the check box ...
My question is this ... is there a way in C or C++ to write this into
the test.exe I made that simply shows "my name is .... "
This is where I am a total newb and have no idea where to go ... I
don''t see any reference to a switch or execute in any of the library
files ... the stdio.h or stdlib.h ... i don''t see where i can say
the directory is C:\windir
the program is C:\windir\default
the program has a properties tab
the properties tab has Misc, etc etc ...
the misc tab has an option for "close on exit"
the "close on exit" should be false
I have no idea really ... i don''t even know if it possible ... maybe
it''s better to just reg hack it and save the batch file ...
Any ideas ? or I am way the hell off base ? :) !
推荐答案
st ************ @ gmail.com 写道:
>
所以我在玩C并编译一个小的.exe文件,用
Miracle C ...简单的说,你好我的名字是等等......但是我
注意到它在dos窗口加载...为什么它不加载
a .txt文件?我的主要问题是这个...在你运行test.exe
之后它会闪烁打开DOS窗口并快速关闭......现在我这个我想知道...我有我的MCE,我接受过Windows XP技术培训
支持...我知道退出时关闭命令被检查对于
应用程序而且我知道只需打开默认属性并选择
选中复选框...
>
So I am fooling around with C and compile a small .exe file with
Miracle C ... simple thing that said Hi my name is etc etc ... but I
noticed that it loads in a dos window ... Why doesn''t it load in
a .txt file ? My main question is this ... after you run the test.exe
it flashes open the DOS window and closes quickly ... now this I
understand ... I do have my MCE and I am trained in Windows XP tech
support ... I know that a "close on exit" command is "checked" for the
application and I know to just open the default properties and de-
select the check box ...
看起来你最好发布到Windows编程组,或者
为你的编译器。
-
Ian Collins。
Looks like you''d be better of posting to a windows programming group, or
one for your compiler.
--
Ian Collins.
保持DOS窗口自动关闭的最简单方法是使用以下命令:
:
系统(暂停);
在返回0之前放置此命令;在你的主要功能中。
这将向终端发出暂停命令,并等待
输入继续。
(我'我不确定我是否完全理解你的问题...所以我很抱歉,如果这是完全偏离主题的话。
1月27日晚上11点48分,Ian Collins< ian-n ... @ hotmail.comwrote:
The simplest way to keep the DOS window from closing automatically is
to use the following command:
system("pause");
place this command just before the return 0; in your main function.
this will issue a pause command to the terminal and will wait until
input to continue.
(I''m not sure i fully understand your questions...so I apologize if
this is completely off topic.)
On Jan 27, 11:48 pm, Ian Collins <ian-n...@hotmail.comwrote:
sterling.mc ... @ gmail.com写道:
sterling.mc...@gmail.com wrote:
所以我在玩C并编译一个小的.exe文件用
Miracle C ......简单的说,你好我的名字是等等。但是我发现它在一个dos窗口加载了......为什么它没有加载到
a .txt文件中?我的主要问题是这个...在你运行test.exe
之后它会闪烁打开DOS窗口并快速关闭......现在我这个我想知道...我有我的MCE,我接受过Windows XP技术培训
支持...我知道退出时关闭命令被检查对于
应用程序,我知道只需打开默认属性,然后选择复选框...看起来你最好发布到一个windows编程组,或
So I am fooling around with C and compile a small .exe file with
Miracle C ... simple thing that said Hi my name is etc etc ... but I
noticed that it loads in a dos window ... Why doesn''t it load in
a .txt file ? My main question is this ... after you run the test.exe
it flashes open the DOS window and closes quickly ... now this I
understand ... I do have my MCE and I am trained in Windows XP tech
support ... I know that a "close on exit" command is "checked" for the
application and I know to just open the default properties and de-
select the check box ...Looks like you''d be better of posting to a windows programming group, or
一个用于你的编译器。
-
Ian Collins 。
one for your compiler.
--
Ian Collins.
lol我不确定我是否完全理解这些问题:)
我对编程很好奇,想看看是什么以及
开始的地方...所以我得到了一些关于C C ++的信息,然后制作了一个简单的文件......
设置了一些变量等...
但是当我注意到dos窗口立即打开和关闭时我只是好奇了......我的意思是在windows中所有我必须做的就是去c :
\ windir \ default并选择属性并取消选中复选框
在退出时关闭...然后开始怀疑我是否可以合并/>
这用C ++命令进入脚本...
也许我需要调查Visual C ++与Windows交互...
再次我不确定只是好奇是
1月28日凌晨1点07分,LoKi < neilgr ... @ gmail.comwrote:
lol I am not sure I fully understand the questions either :)
I am curious about programming and wanted to see what and where to
start ... so I got some info on C C++ and then made a simple file ...
set some varibles etc ...
but when I noticed that the dos window open and closed instantly I was
again just curious ... I mean in windows all I had to do was go to c:
\windir\default and choose the properties and deselect the check box
to close on exit ... and then started to wonder if I could incorperate
this into the script with C C++ commands ...
maybe I need to look into Visual C++ to interact with Windows ...
again I am not sure just curious is all
On Jan 28, 1:07 am, "LoKi" <neilgr...@gmail.comwrote:
保持DOS窗口自动关闭的最简单方法是使用
以下命令:
system(暂停);
在返回0之前放置此命令;在你的主要功能中。
这将向终端发出暂停命令,并等待
输入继续。
(我不确定我是否完全理解你的问题......所以我很抱歉,如果这是完全偏离主题的话,那就是
。)
1月27日,晚上11点48分,Ian Collins< ian-n ... @ hotmail.comwrote:
The simplest way to keep the DOS window from closing automatically is
to use the following command:
system("pause");
place this command just before the return 0; in your main function.
this will issue a pause command to the terminal and will wait until
input to continue.
(I''m not sure i fully understand your questions...so I apologize if
this is completely off topic.)
On Jan 27, 11:48 pm, Ian Collins <ian-n...@hotmail.comwrote:
sterling.mc ... @ gmail.com写道:
sterling.mc...@gmail.com wrote:
所以我在玩C并编译一个小的.exe文件
Miracle C ...简单的事情,说你好我的名字等等...但是我
注意到它加载在dos窗口中......为什么它不加载
a .txt文件?我的主要问题是这个...在你运行test.exe
之后它会闪烁打开DOS窗口并快速关闭......现在我这个我想知道...我有我的MCE,我接受过Windows XP技术培训
支持...我知道退出时关闭命令被检查对于
应用程序,我知道只需打开默认属性,然后选择复选框...看起来你最好发布到一个Windows编程组,或
So I am fooling around with C and compile a small .exe file with
Miracle C ... simple thing that said Hi my name is etc etc ... but I
noticed that it loads in a dos window ... Why doesn''t it load in
a .txt file ? My main question is this ... after you run the test.exe
it flashes open the DOS window and closes quickly ... now this I
understand ... I do have my MCE and I am trained in Windows XP tech
support ... I know that a "close on exit" command is "checked" for the
application and I know to just open the default properties and de-
select the check box ...Looks like you''d be better of posting to a windows programming group, or
一个用于编译器。
one for your compiler.
-
Ian Collins。
--
Ian Collins.
这篇关于刚开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!