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 1588
#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*****@mindsp ring.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*******@yaho o.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*****@mindsp ring.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*******@free net.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************ ***********@new s.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*******@free net.de> wrote in message
news:dv******** *************** *********@4ax.c om... "Sreekanth" <sr*******@yaho o.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*******@free net.de> wrote: "Sreekanth" <sr*******@yaho o.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*******@free net.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*******@yaho o.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. Yahoo store was originally written in Lisp.
c. Emacs
The issues with these will probably come up, so I might as well
mention them myself (which will also make this a more balanced
|
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 built by the database loading. I know exactly what
textbox has what in it. I can do everything by submitting a form but
I do not want a button to submit.
Is there a way to when the window is closed run update code for a
database.
|
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
that the window has been closed. Opera 7.11 and 7.20b7 both throw
errors when trying to check the .closed property.
Is this a bug in Opera, or do I have to (once again) take special
action to make normal javascript work with Opera?
|
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 can't see how a table can close inappropriately.
How can I prevent this.
Hoping to here from MySQL users who have came across this. I'm using MySQL
4.1.11 on RHEL.
|
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 double pointers all over the place.
The program works fine except for one tiny detail. Every time I try to
extract a file, the program terminates with a segmentation fault. I used
| |
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 closed....what kind of code could i write at the
end ??
|
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
Win2K3/IIS6.0), do we still need this patch?
2) Does it specifically solve only this error:
The underlying connection was closed. An unexpected error
|
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. This has been fine until last
week when I started getting javascript 'Permission Denied' errors when
I try to access this property.
I suspect that a windows update has caused this somehow, as this code
has not changed for a very long time. Can...
|
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 it. I checked it and found that another copy of the program still work (by task manager). That's mean closing the program will not close the serial port. I tried these :
Note: I read it using a separate thread.
1)override OnClose to, close the...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |