473,387 Members | 1,553 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

automatically close of the command prompt

Hi, I'm a newbie.
I install cygwin and eclipse for running a C program
However, after i compile the program(with no errors), the console part shows nothing.
Even I run the .exe file, it still can open a window, but it close in a very short time. (i can see the wordings in the window, which is what i want. But it closes too fast)

The code is shown below.

#include <stdio.h>
#include <stdlib.h>

int main(void) {
puts("!!!Hello World!!!\n"); /* prints !!!Hello World!!! */
return EXIT_SUCCESS;
}
Feb 2 '12 #1
1 2209
Rabbit
12,516 Expert Mod 8TB
You have to run it from a command prompt. If you run it by double clicking, it will exit as soon as it's done executing.
Feb 2 '12 #2

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

Similar topics

2
by: Thang Nguyen | last post by:
Hi, my page contains an applet. When I click on a link on the page, the applet will be launched.Now I need my page can be automatically closed when I close my applet.I can call the script from my...
1
by: Stephen Woolhead | last post by:
Anyone know where I can get a command prompt control? Something like the command window in visual studion that I can add my own commands? Thanks Stephen.
4
by: glenn | last post by:
I keep reading all sorts of books on VS that keep telling me to click on Tools/Visual Studio Command prompt to run this program or that program. However, I do not have such a menu choice. Where is...
0
by: John Salerno | last post by:
Is there a way for me to somehow specify that I want Python to search all subdirectories of a particular directory when I'm running or testing files from the command prompt? For example, I have...
1
by: emma_middlebrook | last post by:
Hi If I'm developing a console application, I'd rather not have to go to the project settings and edit the command line arguments each time and then run. Is there a way I can get a console...
6
by: Shooter4Life8 | last post by:
Hi, I am having trouble figureing out the best way to open a command prompt then write lines to it in VB.NET. Currently I have this code, but it execute's too fast I think because Dim psi As...
0
by: ebindia0041 | last post by:
Any help what is wrong with this code.. I am tring to FTP post a file by command prompt but it not work, system hang up.. commands are in my batch file... System.Diagnostics.ProcessStartInfo psi...
10
by: vel | last post by:
Hi, My program is access the remote system's command prompt through C# program. I can do it. But problem is alignment of that output. can any one give idea to align that output ?. here is...
13
by: c3950ig | last post by:
Hi, I am python newbie and the command prompt is having an issue with python. I installed python 2.4.4 onto my windows machine, opened a command prompt window, and typed python to start the...
1
by: flanker9876 | last post by:
Hello Everyone, I have Windows XP. I hope that someone can assist me with the command prompt. Does anyone know if the commands I enter into the command prompt are automatically saved to a...
0
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$) { } ...
0
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...
0
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...
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
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,...
0
jinu1996
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...

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.