Click here to Skip to main content
15,890,882 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionsimple keyboard input ? Pin
bitsNbites20-Jun-05 9:04
bitsNbites20-Jun-05 9:04 
AnswerRe: simple keyboard input ? Pin
Alexander M.,20-Jun-05 9:25
Alexander M.,20-Jun-05 9:25 
AnswerRe: simple keyboard input ? Pin
David Crow20-Jun-05 9:45
David Crow20-Jun-05 9:45 
AnswerRe: simple keyboard input ? Pin
Andrew Walker20-Jun-05 14:03
Andrew Walker20-Jun-05 14:03 
AnswerRe: simple keyboard input ? Pin
ng kok chuan20-Jun-05 17:25
ng kok chuan20-Jun-05 17:25 
GeneralRe: simple keyboard input ? Pin
bitsNbites20-Jun-05 18:06
bitsNbites20-Jun-05 18:06 
GeneralRe: simple keyboard input ? Pin
ng kok chuan20-Jun-05 21:33
ng kok chuan20-Jun-05 21:33 
GeneralRe: simple keyboard input ? Pin
bitsNbites21-Jun-05 4:59
bitsNbites21-Jun-05 4:59 
Ok, these lines of code are directly from the MSDN.
char line[25];
cout << " Type a line terminated by carriage return\n>";
cin.get( line, 25 );
cout << line << endl;
This will run fine when placed in my main, (first lines). However when placed in a method of a class and called, via the user selecting from a menu, the screen continuously scrolls. Do I need to clear the buffer?


Is it always this difficult to code in C++? I have been spending a couple hours just to code to take a line of text from the user.

Also what is the "compile with: /EHsc" that the MSDN shows?


If only I had more time!
GeneralRe: simple keyboard input ? Pin
ng kok chuan21-Jun-05 16:40
ng kok chuan21-Jun-05 16:40 
GeneralRe: simple keyboard input ? Pin
bitsNbites22-Jun-05 4:13
bitsNbites22-Jun-05 4:13 
GeneralRe: simple keyboard input ? Pin
David Crow21-Jun-05 5:27
David Crow21-Jun-05 5:27 
GeneralRe: simple keyboard input ? Pin
ng kok chuan21-Jun-05 16:32
ng kok chuan21-Jun-05 16:32 
GeneralMKS command line Pin
lynchspawn20-Jun-05 8:36
lynchspawn20-Jun-05 8:36 
GeneralRe: MKS command line Pin
Maverick14310-Jul-12 3:17
Maverick14310-Jul-12 3:17 
GeneralColored Combo Box Pin
sergeyv200220-Jun-05 8:36
sergeyv200220-Jun-05 8:36 
GeneralRe: Colored Combo Box Pin
David Crow20-Jun-05 9:47
David Crow20-Jun-05 9:47 
GeneralRe: Colored Combo Box Pin
sergeyv200220-Jun-05 10:40
sergeyv200220-Jun-05 10:40 
GeneralRe: Colored Combo Box Pin
David Crow20-Jun-05 10:54
David Crow20-Jun-05 10:54 
GeneralBinary Decision Diagram Pin
Member 142769220-Jun-05 7:26
Member 142769220-Jun-05 7:26 
GeneralRe: Binary Decision Diagram Pin
Toni7820-Jun-05 15:49
Toni7820-Jun-05 15:49 
GeneralRe: Binary Decision Diagram Pin
Member 142769220-Jun-05 18:46
Member 142769220-Jun-05 18:46 
Generalcan't find substrings in string Pin
Anonymous20-Jun-05 5:31
Anonymous20-Jun-05 5:31 
GeneralRe: can't find substrings in string Pin
toxcct20-Jun-05 5:51
toxcct20-Jun-05 5:51 
GeneralRe: can't find substrings in string Pin
Cedric Moonen20-Jun-05 6:30
Cedric Moonen20-Jun-05 6:30 
GeneralRe: can't find substrings in string Pin
Rage20-Jun-05 5:53
professionalRage20-Jun-05 5:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.