Click here to Skip to main content
15,906,244 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Filling a child window in a dialog box dynamically Pin
cscafidi4-May-04 9:49
cscafidi4-May-04 9:49 
GeneralRe: Filling a child window in a dialog box dynamically Pin
Rafael Fernández López4-May-04 10:02
Rafael Fernández López4-May-04 10:02 
Generaloverloading operator >> Pin
kfaday4-May-04 8:39
kfaday4-May-04 8:39 
GeneralRe: overloading operator >> Pin
Joaquín M López Muñoz4-May-04 10:31
Joaquín M López Muñoz4-May-04 10:31 
GeneralRe: overloading operator >> Pin
kfaday4-May-04 11:01
kfaday4-May-04 11:01 
GeneralRe: overloading operator >> Pin
Joaquín M López Muñoz4-May-04 11:17
Joaquín M López Muñoz4-May-04 11:17 
GeneralRe: overloading operator >> Pin
kfaday4-May-04 11:38
kfaday4-May-04 11:38 
GeneralRe: overloading operator >> Pin
Joaquín M López Muñoz4-May-04 11:51
Joaquín M López Muñoz4-May-04 11:51 
so what doesn't work is
std::getline(stream,s);
after the getline, there's nothing in s, i debugged it.


OK, I think I know what's the problem. Does your program by chance read from cin with >> before getting to the getline sentence? If so, what's happening is that getline reads the Enter after the last input and returns (quite correctly) an empty string. You may try this theory by invoking getline twice: if I'm right, the second call will get your actual string.

In case this is the problem, you might want to rethink how you do the input: in general, mixing >> and getline can be a little messy to deal with.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: overloading operator >> Pin
kfaday4-May-04 12:43
kfaday4-May-04 12:43 
GeneralSMS Connector to GSM Server ... Pin
rasha20034-May-04 7:59
rasha20034-May-04 7:59 
GeneralRe: SMS Connector to GSM Server ... Pin
toxcct4-May-04 8:24
toxcct4-May-04 8:24 
GeneralRe: SMS Connector to GSM Server ... Pin
rasha20034-May-04 20:05
rasha20034-May-04 20:05 
Generaldialogs (perhaps modal) that dismiss upon losing focus Pin
jonathanleebrown4-May-04 7:34
jonathanleebrown4-May-04 7:34 
GeneralRe: dialogs (perhaps modal) that dismiss upon losing focus Pin
David Crow4-May-04 8:23
David Crow4-May-04 8:23 
GeneralRe: dialogs (perhaps modal) that dismiss upon losing focus Pin
jonathanleebrown4-May-04 8:32
jonathanleebrown4-May-04 8:32 
GeneralRe: dialogs (perhaps modal) that dismiss upon losing focus Pin
David Crow4-May-04 8:42
David Crow4-May-04 8:42 
GeneralRe: dialogs (perhaps modal) that dismiss upon losing focus Pin
jonathanleebrown4-May-04 9:20
jonathanleebrown4-May-04 9:20 
GeneralRe: dialogs (perhaps modal) that dismiss upon losing focus Pin
jonathanleebrown4-May-04 9:30
jonathanleebrown4-May-04 9:30 
GeneralRe: dialogs (perhaps modal) that dismiss upon losing focus Pin
David Crow4-May-04 10:07
David Crow4-May-04 10:07 
GeneralRe: dialogs (perhaps modal) that dismiss upon losing focus Pin
jonathanleebrown4-May-04 10:14
jonathanleebrown4-May-04 10:14 
GeneralBroadcasting a message Pin
#realJSOP4-May-04 7:24
professional#realJSOP4-May-04 7:24 
GeneralRe: Broadcasting a message Pin
David Crow4-May-04 8:27
David Crow4-May-04 8:27 
GeneralRe: Broadcasting a message Pin
#realJSOP4-May-04 8:49
professional#realJSOP4-May-04 8:49 
GeneralRe: Broadcasting a message Pin
David Crow4-May-04 9:00
David Crow4-May-04 9:00 
Generalmarshalling COM to .NET problem Pin
Member 9300224-May-04 7:03
Member 9300224-May-04 7:03 

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.