hey guy !!
i m a beginer on C prog...i m using DEV-C IDE but when i m running a .EXE
the dos window open , run the .EXE and closed quickly, how could i do if i
don't want the dos window closed....what kind of code could i write at the
end ?? 7 1566
#kiss# wrote: hey guy !!
i m a beginer on C prog...i m using DEV-C IDE but when i m running a .EXE the dos window open , run the .EXE and closed quickly, how could i do if i don't want the dos window closed ....what kind of code could i write at the end ??
Find out where the compiler puts a.exe,
and then open a window there,
and then run a.exe from that window, instead of from the IDE.
--
pete
Did you try using getch() as the last statement of your main.
"pete" <pf*****@mindspring.com> wrote in message
news:40***********@mindspring.com... #kiss# wrote: hey guy !!
i m a beginer on C prog...i m using DEV-C IDE but when i m running a .EXE the dos window open , run the .EXE and closed quickly, how could i do if i don't want the dos window closed ....what kind of code could i write at the end ??
Find out where the compiler puts a.exe, and then open a window there, and then run a.exe from that window, instead of from the IDE.
-- pete
"Sreekanth" <sr*******@yahoo.com> wrote:
[Please don't top-post] Did you try using getch() as the last statement of your main.
Since getch() is not a standard C function, use getchar() instead.
"pete" <pf*****@mindspring.com> wrote in message news:40***********@mindspring.com... #kiss# wrote: > > hey guy !! > > i m a beginer on C prog...i m using DEV-C IDE > but when i m running a .EXE > the dos window open , run the .EXE and closed quickly, > how could i do if i > don't want the dos window closed > ....what kind of code could i write at the end ??
Find out where the compiler puts a.exe, and then open a window there, and then run a.exe from that window, instead of from the IDE.
--
Irrwahn Grausewitz (ir*******@freenet.de)
welcome to clc: http://www.ungerhu.com/jxh/clc.welcome.txt
clc faq-list : http://www.faqs.org/faqs/C-faq/faq/
clc OT guide : http://benpfaff.org/writings/clc/off-topic.html
In <40***********************@news.free.fr> "#kiss#" <bi**@free.fr> writes: i m a beginer on C prog...i m using DEV-C IDE but when i m running a .EXE the dos window open , run the .EXE and closed quickly, how could i do if i don't want the dos window closed....what kind of code could i write at the end ??
Obviously, some code expecting you to press the Enter key before
continuing. Even as a beginner you should be able to figure it out.
Or, don't bother at all and keep a console window permanently open.
Rebuild the program from the IDE, but execute it from your console.
Dan
--
Dan Pop
DESY Zeuthen, RZ group
Email: Da*****@ifh.de
"Irrwahn Grausewitz" <ir*******@freenet.de> wrote in message
news:dv********************************@4ax.com... "Sreekanth" <sr*******@yahoo.com> wrote:
[Please don't top-post]
Did you try using getch() as the last statement of your main.
Since getch() is not a standard C function, use getchar() instead.
The OP will probably need two of them if they are reading input with scanf.
If the code only has one getchar call, it will typically swallow the newline left in the
stream and the program will exit immediately (closing the window) as before.
--
Peter
"Peter Nilsson" <ai***@acay.com.au> wrote: "Irrwahn Grausewitz" <ir*******@freenet.de> wrote: "Sreekanth" <sr*******@yahoo.com> wrote:
>Did you try using getch() as the last statement of your main.
Since getch() is not a standard C function, use getchar() instead.
The OP will probably need two of them if they are reading input with scanf.
If the code only has one getchar call, it will typically swallow the newline left in the stream and the program will exit immediately (closing the window) as before.
Correct, but actually I use this as a test from time to time:
if the program didn't stop on the final getchar(), I know my
code failed to correctly consume all given input.
Regards
--
Irrwahn Grausewitz (ir*******@freenet.de)
welcome to clc: http://www.ungerhu.com/jxh/clc.welcome.txt
clc faq-list : http://www.faqs.org/faqs/C-faq/faq/
clc OT guide : http://benpfaff.org/writings/clc/off-topic.html
"Sreekanth" <sr*******@yahoo.com> wrote in message
news:c5**********@news.mch.sbs.de... Did you try using getch() as the last statement of your main.
Or try
system("pause");
you need to include <stdlib.h>
HTH
--
Have a nice day
Remove (*dele*te) from email to reply This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: mike420 |
last post by:
In the context of LATEX, some Pythonista asked what the big
successes of Lisp were. I think there were at least three *big*
successes.
a. orbitz.com web site uses Lisp for algorithms, etc.
b....
|
by: Brent Webster |
last post by:
I have an asp page that is attached to database and I want to update
the database when the window is closed.
It is basically 5 text boxes wide by 8 text boxes high and these are
all dynamically...
|
by: Matt Kruse |
last post by:
See: http://www.mattkruse.com/temp/window_closed.html
It looks like the .closed property of a window is inaccessible if the
window is actually closed. Other browsers have no problem detecting...
|
by: Matt |
last post by:
Hi everyone,
I'm using the command mysqlcheck --all-databases --auto-repair --silent
and I see these warnings (listed below) on a daily occurrence. Is mysqlcheck
causing these warnings? I...
|
by: James Leddy |
last post by:
Hello,
I am making a program that encrypts and compresses plain text and indexes
them by date.
Needless to say, I have many alloc(), realloc(), calloc(), and free() calls.
There are also...
|
by: #kiss# |
last post by:
hey guy !!
i m a beginer on C prog...i m using DEV-C IDE but when i m running a .EXE
the dos window open , run the .EXE and closed quickly, how could i do if i
don't want the dos window...
|
by: hb |
last post by:
Hi,
Would you please tell me how to detect if the client's browser is closed?
I need such event to trigger a database modification.
Thank you
hb
|
by: Rajeev Tipnis |
last post by:
http://support.microsoft.com/default.aspx?scid=kb;en-
us;819450
Questions:
1) Is this patch (fix) applicable to the .NET 1.1
Framework as well? That is, if we have Framework 1.1 (On...
|
by: alistair_henderson |
last post by:
Morning All,
I have some code for a website which uses 'window.open' to simulate
modal dialog boxes. I use the window.closed property to decide if the
window object exists at various points. ...
|
by: Bassem |
last post by:
I'm working on simple chat program via serial port. It works fine, but i face this problem.
When i try to open the exe, UnauthorizedAccess exception occurs, i can't use COM1 becuase someone else has...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |