You'd do better to ask this type of question on a programming mailing list.
The one I belong to is program-l:
[email protected]
Put the word subscribe in the subject line.
Stay well
Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'
----- Original Message -----
From: "Kevin Andrews" <[email protected]>
To: "blind-computing" <[email protected]>
Sent: Friday, February 26, 2010 5:09 AM
Subject: [Blind-Computing] C++ question
Hi all,
I program in C++ for leisure. Any C++ programmers on the list: i've been
attempting to make it so that when a user is asked for input, and they
enter a single character, then the program continues. Let me try and
explain.
Say I make a program and it presents the user with a menu of choices (a
console program). (options a, b, c, d, etc). I want it so that it reads a
single character and then does something with it, without waiting for the
enter key. Here's a program I've made, just to see if it works. I'm having
trouble compiling. I'm using Dev C++ on Windows. I didn't do <iostream.h>
I just did <iostream> also I just did <conio> rather than <conio.h> when
including the appropriate header files
Thanks!
#include <conio>
#include <iostream>
using namespace std;
int main()
{
char blabla;
cout<<"Enter a character, any character!\n";
blabla = getch();
cout<<"Thanks, quitting now.\n";
system("pause");
return 0;
}
Any help is greatly appreciated in advance.
For answers to frequently asked questions about this list visit:
http://www.jaws-users.com/help/
__________ Information from ESET NOD32 Antivirus, version of virus
signature database 4896 (20100225) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
__________ Information from ESET NOD32 Antivirus, version of virus signature
database 4896 (20100225) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
For answers to frequently asked questions about this list visit:
http://www.jaws-users.com/help/