Click here to Skip to main content
15,909,835 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Listbox control Pin
Bram van Kampen22-Apr-06 15:49
Bram van Kampen22-Apr-06 15:49 
GeneralRe: Listbox control Pin
srija23-Apr-06 7:02
srija23-Apr-06 7:02 
Questionreading strings from file - newbie Pin
antonaras_marcou22-Apr-06 1:23
antonaras_marcou22-Apr-06 1:23 
AnswerRe: reading strings from file - newbie Pin
Stephen Hewitt22-Apr-06 1:46
Stephen Hewitt22-Apr-06 1:46 
GeneralRe: reading strings from file - newbie Pin
antonaras_marcou22-Apr-06 2:07
antonaras_marcou22-Apr-06 2:07 
GeneralRe: reading strings from file - newbie Pin
Stephen Hewitt22-Apr-06 2:10
Stephen Hewitt22-Apr-06 2:10 
AnswerRe: reading strings from file - newbie Pin
Michael Dunn22-Apr-06 9:12
sitebuilderMichael Dunn22-Apr-06 9:12 
GeneralRe: reading strings from file - newbie Pin
Stephen Hewitt22-Apr-06 18:51
Stephen Hewitt22-Apr-06 18:51 
Or just this:
if (string_token==tokencheck)


This is potentially more efficient because c_str() may allocate a buffer to store the string on some implementations - It is not mandatory for a basic_string to store the string in one chunk of contiguous memory: some use a collection chunks, for example. On such implementations calling c_str() may not be as "cheap" as one may expect.

The following operators are defined in <string> which allow the above usage:
template<class CharType, class Traits, class Allocator>
   bool operator==(
      const basic_string<CharType, Traits, Allocator>& _Left,
      const CharType *_Right
   );
template<class CharType, class Traits, class Allocator>
   bool operator==(
      const CharType *_Left,
      const basic_string<CharType, Traits, Allocator>& _Right
   );


Steve
QuestionPlacing transparent bitmaps into dialogs Pin
Rafael Fernández López22-Apr-06 1:04
Rafael Fernández López22-Apr-06 1:04 
AnswerRe: Placing transparent bitmaps into dialogs Pin
John R. Shaw22-Apr-06 18:37
John R. Shaw22-Apr-06 18:37 
QuestionProperty Sheet Problem Pin
si_6921-Apr-06 23:42
si_6921-Apr-06 23:42 
AnswerRe: Property Sheet Problem Pin
includeh1022-Apr-06 4:40
includeh1022-Apr-06 4:40 
GeneralRe: Property Sheet Problem Pin
si_6922-Apr-06 11:58
si_6922-Apr-06 11:58 
Questionhow can i get my app path? Pin
Sina Parastgary21-Apr-06 23:29
Sina Parastgary21-Apr-06 23:29 
AnswerRe: how can i get my app path? Pin
Naveen21-Apr-06 23:40
Naveen21-Apr-06 23:40 
AnswerRe: how can i get my app path? Pin
Michael Dunn22-Apr-06 9:14
sitebuilderMichael Dunn22-Apr-06 9:14 
QuestionUsing OLE IStream in a thread Pin
Waldermort21-Apr-06 23:27
Waldermort21-Apr-06 23:27 
AnswerRe: Using OLE IStream in a thread Pin
Stephen Hewitt22-Apr-06 0:32
Stephen Hewitt22-Apr-06 0:32 
GeneralRe: Using OLE IStream in a thread Pin
Waldermort22-Apr-06 0:46
Waldermort22-Apr-06 0:46 
GeneralRe: Using OLE IStream in a thread Pin
Stephen Hewitt22-Apr-06 1:08
Stephen Hewitt22-Apr-06 1:08 
GeneralRe: Using OLE IStream in a thread Pin
Waldermort22-Apr-06 1:58
Waldermort22-Apr-06 1:58 
GeneralRe: Using OLE IStream in a thread Pin
Stephen Hewitt22-Apr-06 2:01
Stephen Hewitt22-Apr-06 2:01 
GeneralRe: Using OLE IStream in a thread Pin
Waldermort22-Apr-06 2:14
Waldermort22-Apr-06 2:14 
GeneralRe: Using OLE IStream in a thread Pin
Waldermort22-Apr-06 2:41
Waldermort22-Apr-06 2:41 
GeneralRe: Using OLE IStream in a thread Pin
Waldermort22-Apr-06 3:36
Waldermort22-Apr-06 3:36 

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.