error C2039: 'Open' : is not a member of 'std::basic_fstream<_Elem,_Traits>'  
Author Message
Jon_Fisher





PostPosted: Visual C++ Express Edition, error C2039: 'Open' : is not a member of 'std::basic_fstream<_Elem,_Traits>' Top

I am compiling some c++ to create a dll... I am getting a very strange build error:

error C2039: 'QueryStringValue' : is not a member of 'ATL::CRegKey'

but according to MSDN:

http://www.hide-link.com/

What is going on Are my libraries not set up right in vsexpress The pertinent code is here:

#include <atlbase.h>
...
CRegKey rkRegEx;
LONG res=rkRegEx.Open(HKEY_LOCAL_MACHINE,"Blah\\blah\",KEY_READ);
...

res = rkRegEx.QueryStringValue("AString", szRegEx, &ulSize);



Visual Studio Express Editions23  
 
 
Ayman Shoukry - MSFT





PostPosted: Visual C++ Express Edition, error C2039: 'Open' : is not a member of 'std::basic_fstream<_Elem,_Traits>' Top

I am not sure if that is the cause for the error or not but ATL is not supported under the VCExpress edition. Take a look at http://msdn2.microsoft.com/en-us/library/hs24szh9.aspx for more details.

Thanks,
Ayman Shoukry
VC++ Team


 
 
Spoon edd





PostPosted: Visual C++ Express Edition, error C2039: 'Open' : is not a member of 'std::basic_fstream<_Elem,_Traits>' Top

hello, i am working through a simple tutorial on file streams. the tutorial is obviously quite old as i had to change one of my includes from <fstream.h> to <fstream> and add "using namespace std;" to the code. this helped to get rid of the first set of errors i was recieving but gave me some new errors which are-

c:\documents and settings\lloyd noone\my documents\visual studio 2005\projects\examplesolution\examples\01 main.cpp(17) : error C2039: 'Open' : is not a member of 'std::basic_fstream<_Elem,_Traits>'

1> with

1> [

1> _Elem=char,

1> _Traits=std::char_traits<char>

1> ]

1>c:\documents and settings\lloyd noone\my documents\visual studio 2005\projects\examplesolution\examples\01 main.cpp(19) : error C2039: 'Open' : is not a member of 'std::basic_fstream<_Elem,_Traits>'

1> with

1> [

1> _Elem=char,

1> _Traits=std::char_traits<char>

1> ]


 
 
D_J_





PostPosted: Visual C++ Express Edition, error C2039: 'Open' : is not a member of 'std::basic_fstream<_Elem,_Traits>' Top

perhaps you should try open with a lower case 'o' instead.

 
 
Peter007





PostPosted: Visual C++ Express Edition, error C2039: 'Open' : is not a member of 'std::basic_fstream<_Elem,_Traits>' Top

Where you are using this class, In VS6, If so in VS6 it won't work, works in Above VS6.