473,386 Members | 1,644 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,386 software developers and data experts.

how can i open the window open

wax
Hello.

// i/o example

#include <iostream>
using namespace std;

int main ()
{
int i;
cout << "Please enter an integer value: ";
cin >i;
cout << "The value you entered is " << i;
cout << " and its double is " << i*2 << ".\n";
return 0;
}

i enter the integer but whan i press enter the programe runs and i can't see
the results.
how can i open the window open?

Thanks
Dec 18 '06 #1
9 2338
wax wrote:
how can i open the window open?
Give up. You aren't clever enough to use a computer.

Dec 18 '06 #2
wax wrote:
how can i open the window open?
Give up. You aren't clever enough to use a computer.

Dec 18 '06 #3
VistaUser wrote:
wax wrote:
how can i open the window open?

Give up. You aren't clever enough to use a computer.

Says the guy who double-posted his message.

*plonk*

Brian
Dec 18 '06 #4
wax wrote:
Hello.

// i/o example

#include <iostream>
using namespace std;

int main ()
{
int i;
cout << "Please enter an integer value: ";
cin >i;
cout << "The value you entered is " << i;
cout << " and its double is " << i*2 << ".\n";
return 0;
}

i enter the integer but whan i press enter the programe runs and i can't see
the results.
how can i open the window open?
try adding

int dummy;
cin >dummy;

before the return. This will wait for a number and an enter.

or add

for(;;) {}

which will result in an infinite loop.

HTH,
- J.
Dec 19 '06 #5
Jacek Dziedzic wrote:
SNIP]
try adding

int dummy;
cin >dummy;

before the return. This will wait for a number and an enter.

or add

for(;;) {}

which will result in an infinite loop.
std::cin.get(); ?

--
WW aka Attila
:::
It is easy to be flexible when one is spineless.
Dec 19 '06 #6

wax wrote:
Hello.

// i/o example

#include <iostream>
using namespace std;

int main ()
{
int i;
cout << "Please enter an integer value: ";
cin >i;
cout << "The value you entered is " << i;
cout << " and its double is " << i*2 << ".\n";
return 0;
}

i enter the integer but whan i press enter the programe runs and i can't see
the results.
how can i open the window open?
You mean, how can you keep the window open. Typically, by running the
program in the environment it is written for. However, here is a
portable way to pause in the case you are executing a link (instead of
invoking the program from the console):

#include <iostream>
#include <ostream>
#include <limits>

int main(void)
{
// do stuff
std::cout << "Press Enter to Exit.";
std::cin.ignore(std::numeric_limits<std::streamsiz e>::max(), '\n');
return 0;
}

Dec 19 '06 #7

VistaUser wrote:
wax wrote:
how can i open the window open?

Give up. You aren't clever enough to use a computer.
Some people don't use English as a first (or even a second language).
Yet he managed to Post a relatively clear question without replicating
*his* Post. Who do you think is more clever?

Dec 19 '06 #8

"VistaUser дµÀ£º
"
wax wrote:
how can i open the window open?

Give up. You aren't clever enough to use a computer.
This is not the correct attitude toward a question.

Dec 19 '06 #9

Salt_Peter wrote:
VistaUser wrote:
wax wrote:
how can i open the window open?
Give up. You aren't clever enough to use a computer.

Some people don't use English as a first (or even a second language).
Yet he managed to Post a relatively clear question without replicating
*his* Post. Who do you think is more clever?
Like hell he did. He posted the exact same question a half hour before
that under a different subject thread.

http://groups.google.com/group/comp....606533d1a77164

Dec 19 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Paul | last post by:
I link to a web site from an Excel spreadsheet. The page i link to is getCookie.asp which sets a cookie then returns back some html which opens a new window, to the same site but a different page...
6
by: Les | last post by:
Hi, I'd like to find out how to use the window.open() script in Fireworks MX. I have posted my question in the Fireworks forum but didn't get any replies. Since it's javascript, maybe someone...
10
by: Marshall Dudley | last post by:
When I do the following line in Netscape, the popup loads as it should, but the parent window usually, but not always, reloads as well. <a href="#"...
10
by: David McCulloch | last post by:
The following code opens a new window, but the "resizeTo" doesn't resize it. Why not? (Don't ask why I simply did not open the window with the new size....my original problem was how to open a...
2
by: Samir Pandey | last post by:
Hello, I am using the following javascript code to open a new window. Somehow, IE always opens a new window. It doesn't open target url in the window name given. All i want is, if there is a...
3
by: NeverLift | last post by:
But, if it's not open, I don't want to open it . . . using window.open will open it if it doesn't exist, even if the url in that open is null (the window is then empty -- but it's open). The...
2
by: Larry R Harrison Jr | last post by:
I have pull-down menus in javascript and I have the code for opening a link in a new window. But I want it to open a full-sized window. I can't figure out the syntax. What I have so far: ...
8
by: Dominic Tocci | last post by:
I'm searching for a way to use window.open on my web page to open a window in firefox that allows the sidebars to work (bookmarks, history, etc). When I use the following: var...
7
by: anthony.turcotte | last post by:
Hi, I've looked for a solution to this problem on google, read posts in this newsgroup and I still haven't found anything that could help me. Here's the scenario. 1. User accesses...
13
by: Geoff Fox | last post by:
I am in the final moments of designing a new website. One of the pages (http://www.auditionfactory.com/samples.php) has four links to show sample work. I would like these links to open new...
0
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,...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...

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.