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

C / C++ / MFC

 
GeneralRe: C++ Question. Pin
Kevin McFarlane15-Nov-03 4:12
Kevin McFarlane15-Nov-03 4:12 
GeneralRe: C++ Question. Pin
WREY15-Nov-03 7:23
WREY15-Nov-03 7:23 
GeneralRe: C++ Question. Pin
Kevin McFarlane15-Nov-03 10:00
Kevin McFarlane15-Nov-03 10:00 
GeneralRe: C++ Question. Pin
WREY15-Nov-03 10:45
WREY15-Nov-03 10:45 
GeneralRe: C++ Question. Pin
Prakash Nadar15-Nov-03 19:58
Prakash Nadar15-Nov-03 19:58 
GeneralRe: C++ Question. Pin
Steve Messer15-Nov-03 5:40
Steve Messer15-Nov-03 5:40 
GeneralRe: C++ Question. Pin
Jeryth15-Nov-03 7:12
Jeryth15-Nov-03 7:12 
GeneralRe: C++ Question. Pin
WREY15-Nov-03 8:37
WREY15-Nov-03 8:37 
Thanks for your reply.

Because I've worked with 'string' so often, and have equally studied its syntaxes and member functions in the C++ Standard library so much as well, I can say that the authors of 'string' went above and beyond their call of duty to make it as robust as possible. Not only is this reflected in the ways they have tried to make it as seamless for backward compatibility when dealing with C-Style 'char*' string, but they have sought to expand it with features that the old C-Style string did not possess.

For example, the C++ Standard has overloaded the string comparison operators to accept three different kinds of comparisons when comparing std::strings.

1) a std::string with another std::string
2) a std::string with a C-Style char* cstr
3) a C-Style char* cstr with a std::string

Those operators represent, ==, !=, <, >, <=, and >=. So there is no need to use the old C-Style 'strcmp' or 'strncmp' functions (which deals specifically with C-Style char* strings) when working with std::string.

I believe the problem I'm experiencing, has more to do with 'getline()' than with 'strings'.

I've had so many problems in the past using 'getline()', that I shun it like the plague. It's a beast of its own kind that seems to operate like a renegade. It might have good qualities, but (for me) it doesn't seem to be very lending.

Sigh | :sigh:

William

Fortes in fide et opere!
GeneralRe: C++ Question. Pin
Michael Gunlock15-Nov-03 13:44
Michael Gunlock15-Nov-03 13:44 
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 
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 

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.