Click here to Skip to main content
15,887,450 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: CAsyncSocket and Message Pump Pin
Mark Salsbery26-Oct-07 12:10
Mark Salsbery26-Oct-07 12:10 
GeneralRe: CAsyncSocket and Message Pump Pin
Don Rolando26-Oct-07 20:20
Don Rolando26-Oct-07 20:20 
GeneralRe: CAsyncSocket and Message Pump [modified] Pin
Don Rolando26-Oct-07 21:51
Don Rolando26-Oct-07 21:51 
GeneralRe: CAsyncSocket and Message Pump Pin
Mark Salsbery27-Oct-07 6:57
Mark Salsbery27-Oct-07 6:57 
GeneralRe: CAsyncSocket and Message Pump Pin
Moak8-Nov-07 12:03
Moak8-Nov-07 12:03 
GeneralRe: CAsyncSocket and Message Pump Pin
Blake Miller20-Nov-07 6:53
Blake Miller20-Nov-07 6:53 
QuestionCHtmlView - how to get session Pin
m1m226-Oct-07 8:49
m1m226-Oct-07 8:49 
QuestionProgram terminates Pin
pourang26-Oct-07 8:28
pourang26-Oct-07 8:28 
#include<iostream>
using namespace std;

int main()
{
cout << " please choise one of these lables: " << endl << endl;
cout << " c)Carnivore p) Pianist " << endl << endl;
cout << " t)Tree g) Game ";

char ch;
cin >> ch;

while ( ch != 'c' && ch != 'p' && ch != 't' && ch != 'g' )
{
cout << " Please enter C,p,t,g " << endl << endl;
cin >> ch;
}

switch (ch)
{

case 'c' : cout << "A cat is a carnivore.\n";
break;
case 'p' : cout << "Radu Lupu is a pianist.\n";
break;
case 't' : cout << "A maple is a tree.\n";
break;
case 'g' : cout << "Golf is a game.\n";
break;
default : cout << "The program shouldn't get here!\n";
}


cin.get();
cin.get();

return 0;
}



You see!? every time you enter a number the while loop does his job and prompt the message:

" Please enter C,p,t,g ". But when i type a uppercase like G or D program terminates.

Whay while loop doesn't prompt the message?




int life()
{
in a land with no bird, no spring. My first journey was a
return 0;
}

AnswerRe: Program terminates [modified] Pin
Chris Losinger26-Oct-07 8:31
professionalChris Losinger26-Oct-07 8:31 
GeneralRe: Program terminates Pin
pourang26-Oct-07 8:34
pourang26-Oct-07 8:34 
GeneralRe: Program terminates Pin
pourang26-Oct-07 8:36
pourang26-Oct-07 8:36 
QuestionRe: Program terminates Pin
David Crow26-Oct-07 8:37
David Crow26-Oct-07 8:37 
AnswerRe: Program terminates Pin
Chris Losinger26-Oct-07 9:10
professionalChris Losinger26-Oct-07 9:10 
QuestionCWinApp::OnIdle problem?? Pin
SandipG 26-Oct-07 8:01
SandipG 26-Oct-07 8:01 
QuestionDialog based application for different screen resolutions Pin
victoria195026-Oct-07 7:47
victoria195026-Oct-07 7:47 
AnswerRe: Dialog based application for different screen resolutions [modified] Pin
Mattias G26-Oct-07 13:41
Mattias G26-Oct-07 13:41 
AnswerRe: Dialog based application for different screen resolutions Pin
MANISH RASTOGI26-Oct-07 18:52
MANISH RASTOGI26-Oct-07 18:52 
AnswerRe: Dialog based application for different screen resolutions Pin
Nelek28-Oct-07 23:24
protectorNelek28-Oct-07 23:24 
QuestionLink error _imp_ Pin
ewpendleton26-Oct-07 6:44
ewpendleton26-Oct-07 6:44 
QuestionRe: Link error _imp_ Pin
Hamid_RT26-Oct-07 7:02
Hamid_RT26-Oct-07 7:02 
AnswerRe: Link error _imp_ Pin
ewpendleton26-Oct-07 9:26
ewpendleton26-Oct-07 9:26 
AnswerRe: Link error _imp_ Pin
Chris Losinger26-Oct-07 9:15
professionalChris Losinger26-Oct-07 9:15 
Questioncompile error,please help me, Pin
nhathoang26-Oct-07 5:48
nhathoang26-Oct-07 5:48 
AnswerRe: compile error,please help me, Pin
Mark Salsbery26-Oct-07 5:56
Mark Salsbery26-Oct-07 5:56 
GeneralRe: compile error,please help me, Pin
nhathoang26-Oct-07 7:21
nhathoang26-Oct-07 7:21 

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.