Click here to Skip to main content
14,934,503 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: OT Pin
_Flaviu6-Oct-19 23:32
Member_Flaviu6-Oct-19 23:32 
GeneralRe: OT Pin
Richard MacCutchan7-Oct-19 2:35
mveRichard MacCutchan7-Oct-19 2:35 
Questionidentifier 'mode_t' Pin
_Flaviu6-Oct-19 8:08
Member_Flaviu6-Oct-19 8:08 
AnswerRe: identifier 'mode_t' Pin
Victor Nijegorodov6-Oct-19 9:57
MemberVictor Nijegorodov6-Oct-19 9:57 
GeneralRe: identifier 'mode_t' Pin
_Flaviu6-Oct-19 10:08
Member_Flaviu6-Oct-19 10:08 
GeneralRe: identifier 'mode_t' Pin
Richard MacCutchan6-Oct-19 22:30
mveRichard MacCutchan6-Oct-19 22:30 
SuggestionRe: identifier 'mode_t' Pin
David Crow6-Oct-19 11:48
MemberDavid Crow6-Oct-19 11:48 
Questionerror C2678 Pin
_Flaviu4-Oct-19 4:54
Member_Flaviu4-Oct-19 4:54 
I've met a weird error:
error C2678: binary '|=' : no operator found which takes a left-hand operand of type 'FILE_ATTR_FLAGS' (or there is no acceptable conversion)

1>        c:\program files (x86)\microsoft sdks\windows\v7.0a\include\propsys.h(703): could be 'GETPROPERTYSTOREFLAGS &operator |=(GETPROPERTYSTOREFLAGS &,GETPROPERTYSTOREFLAGS)'
1>        c:\program files (x86)\microsoft sdks\windows\v7.0a\include\propsys.h(1685): or       'PROPDESC_TYPE_FLAGS &operator |=(PROPDESC_TYPE_FLAGS &,PROPDESC_TYPE_FLAGS)'
1>        c:\program files (x86)\microsoft sdks\windows\v7.0a\include\propsys.h(1704): or       'PROPDESC_VIEW_FLAGS &operator |=(PROPDESC_VIEW_FLAGS &,PROPDESC_VIEW_FLAGS)'
........
........
1>        c:\program files (x86)\microsoft sdks\windows\v7.0a\include\shobjidl.h(31763): or       'HOMEGROUPSHARINGCHOICES &operator |=(HOMEGROUPSHARINGCHOICES &,HOMEGROUPSHARINGCHOICES)'
1>        c:\program files (x86)\microsoft sdks\windows\v7.0a\include\shobjidl.h(32037): or       'LIBRARYOPTIONFLAGS &operator |=(LIBRARYOPTIONFLAGS &,LIBRARYOPTIONFLAGS)'
1>        c:\program files (x86)\microsoft sdks\windows\v7.0a\include\shobjidl.h(32052): or       'LIBRARYSAVEFLAGS &operator |=(LIBRARYSAVEFLAGS &,LIBRARYSAVEFLAGS)'
1>        c:\program files (x86)\microsoft sdks\windows\v7.0a\include\shobjidl.h(32793): or       'LIBRARYMANAGEDIALOGOPTIONS &operator |=(LIBRARYMANAGEDIALOGOPTIONS &,LIBRARYMANAGEDIALOGOPTIONS)'
1>        c:\program files (x86)\microsoft sdks\windows\v7.0a\include\thumbcache.h(119): or       'WTS_FLAGS &operator |=(WTS_FLAGS &,WTS_FLAGS)'
1>        c:\program files (x86)\microsoft sdks\windows\v7.0a\include\thumbcache.h(127): or       'WTS_CACHEFLAGS &operator |=(WTS_CACHEFLAGS &,WTS_CACHEFLAGS)'
1>        c:\program files (x86)\microsoft sdks\windows\v7.0a\include\shlobj.h(542): or       'SHELL_LINK_DATA_FLAGS &operator |=(SHELL_LINK_DATA_FLAGS &,SHELL_LINK_DATA_FLAGS)'
1>        c:\program files (x86)\microsoft sdks\windows\v7.0a\include\shlobj.h(1394): or       'KNOWN_FOLDER_FLAG &operator |=(KNOWN_FOLDER_FLAG &,KNOWN_FOLDER_FLAG)'
1>        while trying to match the argument list '(FILE_FLAGS, FILE_FLAGS)'

Here is the code that generate the error:
sc->flags |= flag;

where flag is FILE_FLAGS, and sc->flags is
struct scr {
....
....
	FILE_FLAGS flags;
....
};


Now, of course that I'ave tried:
scr& operator|=(const scr& rhs)
{
    return *this;
}

but this error doesn't disappeared ... have you met this kind of error ? I have to mention that I wrote here the simplified code ...
QuestionRe: error C2678 Pin
Richard MacCutchan4-Oct-19 5:09
mveRichard MacCutchan4-Oct-19 5:09 
AnswerRe: error C2678 Pin
_Flaviu5-Oct-19 22:53
Member_Flaviu5-Oct-19 22:53 
GeneralRe: error C2678 Pin
Richard MacCutchan5-Oct-19 23:12
mveRichard MacCutchan5-Oct-19 23:12 
GeneralRe: error C2678 Pin
_Flaviu5-Oct-19 23:50
Member_Flaviu5-Oct-19 23:50 
GeneralRe: error C2678 Pin
Richard MacCutchan6-Oct-19 0:04
mveRichard MacCutchan6-Oct-19 0:04 
GeneralRe: error C2678 Pin
_Flaviu6-Oct-19 5:20
Member_Flaviu6-Oct-19 5:20 
GeneralRe: error C2678 Pin
Richard MacCutchan6-Oct-19 5:34
mveRichard MacCutchan6-Oct-19 5:34 
GeneralRe: error C2678 Pin
_Flaviu6-Oct-19 6:35
Member_Flaviu6-Oct-19 6:35 
GeneralRe: error C2678 Pin
Richard MacCutchan6-Oct-19 7:12
mveRichard MacCutchan6-Oct-19 7:12 
GeneralRe: error C2678 Pin
_Flaviu6-Oct-19 7:26
Member_Flaviu6-Oct-19 7:26 
GeneralRe: error C2678 Pin
_Flaviu6-Oct-19 10:04
Member_Flaviu6-Oct-19 10:04 
GeneralRe: error C2678 Pin
Victor Nijegorodov6-Oct-19 20:34
MemberVictor Nijegorodov6-Oct-19 20:34 
GeneralRe: error C2678 Pin
_Flaviu6-Oct-19 21:30
Member_Flaviu6-Oct-19 21:30 
GeneralRe: error C2678 Pin
Victor Nijegorodov6-Oct-19 21:43
MemberVictor Nijegorodov6-Oct-19 21:43 
GeneralRe: error C2678 Pin
_Flaviu6-Oct-19 21:58
Member_Flaviu6-Oct-19 21:58 
GeneralRe: error C2678 Pin
Richard MacCutchan6-Oct-19 22:22
mveRichard MacCutchan6-Oct-19 22:22 
GeneralRe: error C2678 Pin
_Flaviu7-Oct-19 9:16
Member_Flaviu7-Oct-19 9:16 

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.