473,569 Members | 2,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Return key not displaying

The return key is a special character. I'm trying to display the
return key by coping the special character into a character array.
When I run my app, the return key (arrow) does not display. Can
someone offer advice on displaying return, backspace, etc?

Thanks.

May 25 '06 #1
2 1699
lakepeir wrote:
The return key is a special character. I'm trying to display the
return key by coping the special character into a character array.
When I run my app, the return key (arrow) does not display. Can
someone offer advice on displaying return, backspace, etc?


C++ offers only very primitive data entry systems. You can borrow fgets()
from C, or use std::getline(). In a pinch, cin >> might work. And
C++ defines no graphics system to display these codes as anything.

For best results, use Google to find a newsgroup that covers your
platform. Nearly everything about GUIs and data entry are
platform-specific. If you use windows, try
news:microsoft. public.vc.langu age .

--
Phlip

May 25 '06 #2
la******@yahoo. com wrote:
The return key is a special character. I'm trying to display the
return key by coping the special character into a character array.
When I run my app, the return key (arrow) does not display. Can
someone offer advice on displaying return, backspace, etc?

Thanks.


I think the following code uses an extension, but its commonly
implemented, one way or another:
Works in VC7.1 and gcc 4.0

#include <conio.h>
#include <iostream>

#ifdef __GNUC__
inline int _getch(){return getch();}
#endif

int main()
{
int ch;
do{
ch = _getch();
std::cout << ch << '\n';
} while( ch != '\n' );

}
(BTW both gcc and VC++ think Ctrl + return == '\n' on my keyboard, at
least in windows)

regards
Andy Little

May 26 '06 #3

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

Similar topics

4
2175
by: Aaron Reimann | last post by:
I am trying to build a table using results from a database query. Right now (code below), the code displays each result in a new <tr>. I am wanted to display 3 results in one <tr> </tr>, and then create a new <tr> with another 3, etc. Here is human code: print a <tr> if only 1, 2 or 3 results have been returned, show the results and...
1
508
by: Dave Posh | last post by:
I seem to be having a problem displaying time stored in mysql. The format stored in the database is 13:15:05. The database data type is time. I'm using asp vbscript and sql to retrieve the time store in the database. However asp recognizes the data type as date and displays the date instead of the time. If I change the data type in mysql...
2
3436
by: Carole MacDonald | last post by:
There have been lots of posts on this topic, but I haven't been able to apply any of the suggestions to my situation. I have an .aspx page with a form on it that has several submit buttons on it. Clicking a button will cause a web service action that returns XML. I would like to display this XML response on the page with the form. I know...
5
2207
by: Robert | last post by:
Hello Accessors I have some reports created in Access that are very good for what they do. However, it seems to me that when you are displaying information you don't need to print out that a printer-friendly report is not the best way to go. So, I tried converting one of my Access reports to an Access form. I selected the continuous view...
1
2744
by: MDBloemker | last post by:
can anyone help me fathom out how to use this bit of code: Public Class Utilities Public Shared Sub CreateConfirmBox(ByRef txt As WebControls.TextBox, _ ByVal strMessage As String) txt.Attributes.Add("onchange", "return confirm('" & strMessage & "');") End Sub End Class
2
4326
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control displaying the contents of the data source, whilst another control updates the datasource via a command buttons implementation of 'Click', an event...
16
4882
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by Microsoft must be installed on their servers. Now german Umlaute (ä, ü, ö) and quotes are returned incorrectly in SOAP fault responses. This can be...
5
2047
by: Nomen Nescio | last post by:
I'm running gpg in python to verify a signature. I can see that it is working, because gpg is displaying the results. But I need a way to let the python script know this. According to the gpg manual there is a return code from gpg of 0 if the verify is good and 1 if it is bad. Can anyone tell me how I can get the python script to 'see'...
0
7698
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
7612
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...
0
7924
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
8122
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...
0
7970
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
6284
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
3653
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...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
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

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.