473,516 Members | 3,399 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A function that pauses

1 New Member
Hello I'm new here.
I need a function in 'C' that just pauses until the user hit's the enter key.
I wanted to use getchar() however that function opens a stdio window which closes the main user window. So that's no good for me neither is scanf() it does the same thing.
Next I decided to look in the ansi stdio.h file to find a keyboard function I know getchar() has to use some sort of keyboard() to get the characters.
however the stdio.h stuff does not clearly show how getchar() is written or perhaps my windows system is not showing me clearly.

SO can someone please point me to a function such keyboard and where it is located in the ansi 'C' library. Or even one you have written yourself.
Jul 29 '08 #1
3 1356
Banfa
9,065 Recognized Expert Moderator Expert
I wanted to use getchar() however that function opens a stdio window which closes the main user window.
You mean it closes the current console window and opens a new one? or that the program has a GUI Window and that gets shut and a console (stdio) window is opened?
Jul 29 '08 #2
MrPickle
100 New Member
I'm not sure whether or not it's C but I know this function:

system("pause");
Jul 29 '08 #3
gpraghuram
1,275 Recognized Expert Top Contributor
you can use getchar() for this...

Raghu
Jul 30 '08 #4

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

Similar topics

12
5678
by: Ryan Spencer | last post by:
Hello Everyone, I want to have a row of periods, separated by small, say, .5 second intervals between each other. Thus, for example, making it have the appearance of a progress "bar". import time sleep(.5)
3
14911
by: domeceo | last post by:
can anyone tell me why I cannot pass values in a setTimeout function whenever I use this function it says "menu is undefined" after th alert. function imgOff(menu, num) { if (document.images) { document.images.src = eval("mt" +menu+ ".src") } alert("imgOff_hidemenu"); hideMenu=setTimeout('Hide(menu,num)',500);
5
2812
by: phil_gg04 | last post by:
Dear Javascript Experts, Opera seems to have different ideas about the visibility of Javascript functions than other browsers. For example, if I have this code: if (1==2) { function invisible() { alert("invisible() called"); } }
2
7664
by: laredotornado | last post by:
Hello, I am looking for a cross-browser way (Firefox 1+, IE 5.5+) to have my Javascript function execute from the BODY's "onload" method, but if there is already an onload method defined, I would like mine to run immediately after it. So in the code below, what JS would i need to add to my "myfile.inc" page so that I could guarantee this...
2
12665
by: sushil | last post by:
+1 #include<stdio.h> +2 #include <stdlib.h> +3 typedef struct +4 { +5 unsigned int PID; +6 unsigned int CID; +7 } T_ID; +8 +9 typedef unsigned int (*T_HANDLER)(void); +10
7
1844
by: Alfonso Morra | last post by:
How can this work ? I have the following declarations in a header: Header ========= typedef void (*VFPTR)(void) ; void FOO_Callback(void*, char*, char*, int, unsigned long, void*,void*); int bar(int *, char *, VFPTR, void *);
6
1406
by: ruca | last post by:
Hi, How can I force to run a function when a popup window close's??? This function it's present in parent window. Can I run it after popup window close's??? How can I do that??? --
3
949
by: genojoe | last post by:
IN VS.NET 2005, I have a form with over 20,000 lines of code. Frequently, both during debug or non-debug code editing, VS.NET freezes for up to 30 or 60 seconds to collect its thoughts. I think others may be experiencing this problem if they are editing a class with a large amount of code. Here is how I learned to deal with it. I open...
4
1225
by: lawrence k | last post by:
There is a point in rendering a page of mine where my script pauses for a long time. It is a painful wait - maybe 5 seconds. It is long enough that when I try to show the software to people they get bored at that point and begin to look away. I'd like to remove whatever road block slows things down at that point in my script, but I am...
0
7273
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, 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...
0
7405
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, 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. ...
0
7574
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7136
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...
0
7547
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 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...
0
5712
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4769
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...
0
1620
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
1
823
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.