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 1586
#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: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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: 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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
| |
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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |