473,466 Members | 1,286 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How do I make a C++ program close before shutting down?

My program doesn't give me time to read it! I have tried writing [return 0;] at the end but it doesn't work, and most tutorials are outdated, since I am using the newest version.
Nov 26 '10 #1
3 1915
Alex T
29 New Member
Press Ctrl+F5 during debug

or add the following lines at the end before "return 0;":

char response;
cin >> response;
Nov 26 '10 #2
johny10151981
1,059 Top Contributor
The question is not clear enough to answer. What do you mean by

"close before shutting down"

What you want to shut down or what you want to close?
Nov 27 '10 #3
EthanS
1 New Member
Ok thanks that works.
I also found out that I could use cin.get();
Dec 2 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Till Plewe | last post by:
Is there a way to speed up killing python from within a python program? Sometimes shutting down takes more than 10 times as much time as the actual running of the program. The programs are...
24
by: Nancy Drew | last post by:
hi all i'm trying to keep users from being able to login to a site twice at the same time. everytime a user does a login, i stick their userID into an application scoped array. if they try to...
10
by: Jesper | last post by:
Does anyone know some c++ code for shutting down windows? I want to write a program using borland c++ builder to shut down windows. --
1
by: Phoenix | last post by:
Is there any way to disable being able to shut down a program totally? I would have to allow it to be closed when the computer is shutting down or the user is logging out, but other than that it...
5
by: mdb | last post by:
I have an app that I want to keep open (and hidden with an icon in the taskbar) when the user presses the 'X' close window button. So I capture the Closing event on the form and check a bool...
2
by: Mike Stephens | last post by:
I have an application to minimizes when X is clicked. If the user wants to close the application they click the Exit Application button.This works fine and does exactly what I need. I have since...
4
by: Eddie | last post by:
Hi All, In my application, every time the user "Close" the form, I cancel the close and I put a NotifyIcon in the systray. Here is my code : Private myForm_Closing(... ... ...) Handels...
0
by: Sidney | last post by:
Dear, I am writting a system which opened at the system tray. But every before I shut down my computer, I have to close the system first. However, it should be automatically close when I shutting...
4
by: Markus Stoeger | last post by:
Hi, I have a problem with Application.Run() when Windows is shutting down. Please have a look at the copy&paste example program below. The application has no forms. It has only got a notify...
3
by: leocwh | last post by:
Dear all, I would like to know how to run the execuatable before windows shutting down. Here is my simple code: Private Sub Command1_Click() Shell "C:\abc.bat", vbNormalFocus End Sub ...
1
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
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,...
0
tracyyun
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...
0
agi2029
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,...
0
isladogs
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...
0
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...
0
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 ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.