Click here to Skip to main content
15,891,654 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: where "FindFirstFile" fetch drive information ? Pin
Richard MacCutchan26-Feb-16 21:53
mveRichard MacCutchan26-Feb-16 21:53 
AnswerRe: where "FindFirstFile" fetch drive information ? Pin
David Crow28-Feb-16 16:22
David Crow28-Feb-16 16:22 
QuestionHow to dynamically update gdiplus bitmap object in MFC? Pin
Kiran Satish26-Feb-16 7:45
Kiran Satish26-Feb-16 7:45 
AnswerRe: How to dynamically update gdiplus bitmap object in MFC? Pin
Chris Losinger26-Feb-16 8:44
professionalChris Losinger26-Feb-16 8:44 
GeneralRe: How to dynamically update gdiplus bitmap object in MFC? Pin
Kiran Satish26-Feb-16 9:55
Kiran Satish26-Feb-16 9:55 
Newserror:Segmentation fault (core dumped) Pin
Van Nguyen26-Feb-16 2:47
Van 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
Member 1235353126-Feb-16 0:50 
Hello,
Mine is a project in Visual C++, in which I am using STL, and trying to use the "find" algorithm with vectors. But it's giving me the error, error C2678: binary '==' : no operator found which takes a left-hand operand of type 'xyz' (or there is no acceptable conversion), because I have an app class in MFC which has a structure 'xyz' whose only member is a BYTE array. I am trying to get the iterator position by finding a value in a vector of a user-defined type and in return I am getting the above error. Hence a problem. Please help.

OR

someone can also suggest, which algorithm should I use to get the iterator position of the value I am searching for,from a vector of a user-defined data type (you can suggest that algorithm from the boost library also)?
Please help.
Thanks in advance. This is urgent.

Here is the relevant code snippet to understand the problem:

In the header,
typedef struct xyz
{
BYTE byHex[16];

}XYZ;

class CMyApp : public CWinApp
{
-----
------
public:

vector<XYZ> m_vec;
-------
--------

DECLARE_MESSAGE_MAP()
};

And in the implementation, in .cpp,


BYTE byBuff[16] = {0};
vector<XYZ> ::iterator viter;

viter = find(theApp.m_vec.begin(), theApp.m_vec.end(), byBuff);

And, here this "find" algorithm is giving me problems.

-- modified 26-Feb-16 7:29am.
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
Member 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 
GeneralRe: Difficulty in getting iterator upon using find algorithm of STL Pin
Member 123535317-Mar-16 19:23
Member 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
bkelly1324-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
p3im4n24-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
ForNow24-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
ForNow24-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
ForNow24-Feb-16 5:47 

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.