Click here to Skip to main content
16,007,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ Question. Pin
WREY15-Nov-03 14:16
WREY15-Nov-03 14:16 
GeneralRe: C++ Question. Pin
WREY15-Nov-03 21:00
WREY15-Nov-03 21:00 
GeneralRe: C++ Question. Pin
Stye18-Nov-03 17:40
Stye18-Nov-03 17:40 
GeneralRe: C++ Question. Pin
WREY18-Nov-03 18:28
WREY18-Nov-03 18:28 
GeneralRe: C++ Question. Pin
Stye19-Nov-03 19:46
Stye19-Nov-03 19:46 
GeneralRe: C++ Question. Pin
WREY19-Nov-03 20:41
WREY19-Nov-03 20:41 
GeneralRe: C++ Question. Pin
Stye20-Nov-03 5:52
Stye20-Nov-03 5:52 
GeneralRe: C++ Question. Pin
Stye20-Nov-03 18:19
Stye20-Nov-03 18:19 
Doing it the way you have you have to press the enter key twice after getline to get a response (the bug you were referring to). See http://support.microsoft.com/default.aspx?scid=kb;en-us;Q240015 for the fix ( the fix does work if you make the changes in the right file. The file referred to is in two different locations. You might as well change the code in both: MicrosoftVisualStudio\VC98\Include\String and MicrosoftVisualStudio\VC98\CRT\SRC\String I did and the enter key only has to be pressed once now and the code below which is like your way of doing it works fine.

#include "stdafx.h"
#include "string"
#include "iostream"

using namespace std ;

int main(int argc, char* argv[])
{

string s1;
cout << "Enter a sentence:";
getline(cin,s1);
if(s1 == "???" || s1 == "")
cout << "First case";
else
cout << "Second case";

return 0;
}
QuestionI just bought a PocketPC today. I wonder if I can use VC++ to write programs for it? Pin
Link260014-Nov-03 19:23
Link260014-Nov-03 19:23 
AnswerRe: I just bought a PocketPC today. I wonder if I can use VC++ to write programs for it? Pin
Prakash Nadar14-Nov-03 21:14
Prakash Nadar14-Nov-03 21:14 
GeneralRe: I just bought a PocketPC today. I wonder if I can use VC++ to write programs for it? Pin
Link260014-Nov-03 22:31
Link260014-Nov-03 22:31 
GeneralRe: I just bought a PocketPC today. I wonder if I can use VC++ to write programs for it? Pin
Prakash Nadar15-Nov-03 1:06
Prakash Nadar15-Nov-03 1:06 
GeneralRe: I just bought a PocketPC today. I wonder if I can use VC++ to write programs for it? Pin
Kevin McFarlane15-Nov-03 10:06
Kevin McFarlane15-Nov-03 10:06 
GeneralAbout Message Map in MFC(WM_HSCROLL) Pin
Robe14-Nov-03 18:52
Robe14-Nov-03 18:52 
Questionhow can I manipulate IE in vc++6.0 Pin
linlin200014-Nov-03 16:17
linlin200014-Nov-03 16:17 
AnswerRe: how can I manipulate IE in vc++6.0 Pin
Peter Molnar15-Nov-03 16:12
Peter Molnar15-Nov-03 16:12 
GeneralSHGetFileInfo Pin
alex.barylski14-Nov-03 15:47
alex.barylski14-Nov-03 15:47 
GeneralChecking to See if All Memory Allocated is Free Pin
Anonymous14-Nov-03 14:09
Anonymous14-Nov-03 14:09 
GeneralRe: Checking to See if All Memory Allocated is Free Pin
Ryan Roberts14-Nov-03 16:07
Ryan Roberts14-Nov-03 16:07 
GeneralRe: Checking to See if All Memory Allocated is Free Pin
Gopalakrishna Palem15-Nov-03 2:53
Gopalakrishna Palem15-Nov-03 2:53 
GeneralHorizontal ListBox with OWNERDRAW as yes. Pin
DanYELL14-Nov-03 13:49
DanYELL14-Nov-03 13:49 
GeneralHelp with basic sound Pin
Snyp14-Nov-03 12:29
Snyp14-Nov-03 12:29 
GeneralRe: Help with basic sound Pin
Prakash Nadar14-Nov-03 21:22
Prakash Nadar14-Nov-03 21:22 
GeneralGetting the dialog from a propert page Pin
K. Shaffer14-Nov-03 12:05
K. Shaffer14-Nov-03 12:05 
GeneralRe: Getting the dialog from a propert page Pin
Ravi Bhavnani14-Nov-03 13:53
professionalRavi Bhavnani14-Nov-03 13: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.