sh_none is not a member of 'std::basic_filebuf<_Elem,_Traits>'
问题 I am trying to use the Microsoft Specific filebuf::sh_none variable to open an fstream in an exclusive mode (another Microsoft specific function). I am getting the above error. I am importing <fstream> . How can I fix this error? UPDATE : I found this thread, where it was suggested that I try _SH_DENYNO instead. The code compiles, I am testing it now. This doesn't make any sense to me, as this isn't documented in the function. 回答1: What version of Visual C++ are you using? The Visual C++ 6