Click here to Skip to main content
15,913,213 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Help pls! Pin
tongc12-Oct-02 16:37
tongc12-Oct-02 16:37 
GeneralRe: Help pls! Pin
Anonymous12-Oct-02 16:49
Anonymous12-Oct-02 16:49 
GeneralRe: Help pls! Pin
tongc12-Oct-02 16:57
tongc12-Oct-02 16:57 
GeneralRe: Help pls! Pin
Anonymous12-Oct-02 17:06
Anonymous12-Oct-02 17:06 
GeneralRe: Help pls! Pin
tongc12-Oct-02 17:10
tongc12-Oct-02 17:10 
GeneralRe: Help pls! Pin
oly200212-Oct-02 20:03
oly200212-Oct-02 20:03 
GeneralRe: Help pls! Pin
Gary R. Wheeler13-Oct-02 4:43
Gary R. Wheeler13-Oct-02 4:43 
GeneralIdentify blank line with gets() function!! Pin
tongc12-Oct-02 15:17
tongc12-Oct-02 15:17 
Hi
I'd like to get the user's input from the console, if the user put in some text, this information will be put in a buffer, if the user type in nothing in and press enter then the program is terminated. But how do i know if the user has type in something???

i've attempted to play around with this, first with cin.getline, cin.get ...and finally come up with gets(), however it still seem has not done the job.

this is the code that i've attempted
<br />
char input[MAX_PATH];<br />
	char *pInput = input;<br />
		<br />
	cout << "Enter the text " << endl;//prompt for the input<br />
		<br />
	char delimeter =(char)gets(input);//store what the user types <br />
<br />
	while( delimeter != '\r' )<br />
	{<br />
		<br />
//		int length =	strlen(input);	<br />
<br />
		cout << "Enter the text " << endl;<br />
		delimeter =(char)gets(input);<br />
	}<br />
	<br />


Any ideas, helps or suggestions are highly appreciated!!!

Regard,
GeneralRe: Identify blank line with gets() function!! Pin
Roger Stewart12-Oct-02 15:29
professionalRoger Stewart12-Oct-02 15:29 
GeneralRe: Identify blank line with gets() function!! Pin
Gary R. Wheeler13-Oct-02 4:48
Gary R. Wheeler13-Oct-02 4:48 
GeneralRe: Identify blank line with gets() function!! Pin
Ravi Bhavnani13-Oct-02 5:39
professionalRavi Bhavnani13-Oct-02 5:39 
GeneralADOX Console Application Linker Problem Pin
perlmunger12-Oct-02 14:52
perlmunger12-Oct-02 14:52 
GeneralFast selecting from a ListBox Pin
Darroll Walsh12-Oct-02 14:36
Darroll Walsh12-Oct-02 14:36 
QuestionIs this (sort of) normal? Pin
WREY12-Oct-02 14:10
WREY12-Oct-02 14:10 
AnswerRe: Is this (sort of) normal? Pin
Chris Losinger12-Oct-02 14:25
professionalChris Losinger12-Oct-02 14:25 
GeneralRe: Is this (sort of) normal? Pin
WREY12-Oct-02 14:49
WREY12-Oct-02 14:49 
GeneralTransparentBlit and win 95 Pin
RobertC12-Oct-02 11:33
RobertC12-Oct-02 11:33 
GeneralRe: TransparentBlit and win 95 Pin
Paul M Watt12-Oct-02 15:41
mentorPaul M Watt12-Oct-02 15:41 
GeneralRe: TransparentBlit and win 95 Pin
RobertC12-Oct-02 16:18
RobertC12-Oct-02 16:18 
GeneralCWinThread and m_bAutoDelete Pin
Braulio Dez17-Oct-02 7:28
Braulio Dez17-Oct-02 7:28 
GeneralRe: CWinThread and m_bAutoDelete Pin
Joaquín M López Muñoz17-Oct-02 7:43
Joaquín M López Muñoz17-Oct-02 7:43 
GeneralRe: CWinThread and m_bAutoDelete Pin
Braulio Dez17-Oct-02 7:55
Braulio Dez17-Oct-02 7:55 
GeneralRe: CWinThread and m_bAutoDelete Pin
Joaquín M López Muñoz17-Oct-02 8:01
Joaquín M López Muñoz17-Oct-02 8:01 
Generalnsigned to char * Pin
Anonymous12-Oct-02 10:49
Anonymous12-Oct-02 10:49 
GeneralRe: nsigned to char * Pin
John Clayton12-Oct-02 10:53
John Clayton12-Oct-02 10: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.