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

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 1686
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.language .

--
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
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...
1
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...
2
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...
5
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...
1
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)...
2
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...
16
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...
5
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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: 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
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
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...
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,...

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.