Click here to Skip to main content
14,662,281 members
Home » Discussions » C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to dynamically update gdiplus bitmap object in MFC? Pin
Kiran Satish26-Feb-16 9:55
MemberKiran Satish26-Feb-16 9:55 
Newserror:Segmentation fault (core dumped) Pin
Van Nguyen26-Feb-16 2:47
MemberVan Nguyen26-Feb-16 2:47 
GeneralRe: error:Segmentation fault (core dumped) Pin
Jochen Arndt26-Feb-16 3:04
professionalJochen Arndt26-Feb-16 3:04 
QuestionDifficulty in getting iterator upon using find algorithm of STL Pin
Member 1235353126-Feb-16 0:50
MemberMember 1235353126-Feb-16 0:50 
AnswerRe: Difficulty in getting iterator upon using find algorithm of STL Pin
Jochen Arndt26-Feb-16 0:59
professionalJochen Arndt26-Feb-16 0:59 
AnswerRe: Difficulty in getting iterator upon using find algorithm of STL Pin
Jochen Arndt26-Feb-16 1:55
professionalJochen Arndt26-Feb-16 1:55 
GeneralRe: Difficulty in getting iterator upon using find algorithm of STL Pin
Member 1235353126-Feb-16 2:30
MemberMember 1235353126-Feb-16 2:30 
GeneralRe: Difficulty in getting iterator upon using find algorithm of STL Pin
Jochen Arndt26-Feb-16 2:43
professionalJochen Arndt26-Feb-16 2:43 
Quote:
Could you please suggest a better algorithm which will save me from using memcmp?
Here it is:
struct xyz
{
    BYTE byHex[16];
    bool operator==(const xyz& other) const { return other.byHex == this->byHex; }
    bool operator==(const BYTE buf[16]) const { return buf == this->byHex; }
};

But this won't be faster because the compiler will usually generate code that calls memcmp internally (or in most cases uses an inline version of memcmp).

NOTE:
In my initial answer I forgot to make the functions const.
GeneralRe: Difficulty in getting iterator upon using find algorithm of STL Pin
Member 123535317-Mar-16 19:23
MemberMember 123535317-Mar-16 19:23 
GeneralRe: Difficulty in getting iterator upon using find algorithm of STL Pin
Jochen Arndt7-Mar-16 21:41
professionalJochen Arndt7-Mar-16 21:41 
QuestionDLL Features Pin
bkelly1324-Feb-16 12:53
Memberbkelly1324-Feb-16 12:53 
AnswerRe: DLL Features Pin
Jochen Arndt24-Feb-16 21:24
professionalJochen Arndt24-Feb-16 21:24 
AnswerRe: DLL Features Pin
Richard MacCutchan24-Feb-16 21:34
mveRichard MacCutchan24-Feb-16 21:34 
Questioncontrol #define directive Pin
p3im4n24-Feb-16 4:34
Memberp3im4n24-Feb-16 4:34 
SuggestionRe: control #define directive Pin
Jochen Arndt24-Feb-16 4:57
professionalJochen Arndt24-Feb-16 4:57 
AnswerRe: control #define directive Pin
Richard MacCutchan24-Feb-16 8:25
mveRichard MacCutchan24-Feb-16 8:25 
QuestionAssertion From SendNotifyMessage Pin
ForNow24-Feb-16 3:28
MemberForNow24-Feb-16 3:28 
AnswerRe: Assertion From SendNotifyMessage Pin
Jochen Arndt24-Feb-16 3:50
professionalJochen Arndt24-Feb-16 3:50 
GeneralRe: Assertion From SendNotifyMessage Pin
ForNow24-Feb-16 5:45
MemberForNow24-Feb-16 5:45 
QuestionRe: Assertion From SendNotifyMessage Pin
Richard MacCutchan24-Feb-16 4:00
mveRichard MacCutchan24-Feb-16 4:00 
AnswerRe: Assertion From SendNotifyMessage Pin
ForNow24-Feb-16 5:47
MemberForNow24-Feb-16 5:47 
GeneralRe: Assertion From SendNotifyMessage Pin
Richard MacCutchan24-Feb-16 5:50
mveRichard MacCutchan24-Feb-16 5:50 
GeneralRe: Assertion From SendNotifyMessage Pin
ForNow24-Feb-16 6:04
MemberForNow24-Feb-16 6:04 
GeneralRe: Assertion From SendNotifyMessage Pin
Richard MacCutchan24-Feb-16 6:10
mveRichard MacCutchan24-Feb-16 6:10 
GeneralRe: Assertion From SendNotifyMessage Pin
ForNow24-Feb-16 8:07
MemberForNow24-Feb-16 8:07 

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.