Please have a look at this thread:
When I read it I couldn't believe that! I mean.... for years I have done
things like this for instantiating objects:
--------------------------------------
class CL
{
public:
CL (std::string s) {i_=s.length(); }
std::string get_a_string() {return std::string("wo w!");}
protected:
int i_;
};
.....
int main(....)
{
CL cl(std::string( "whatever") );
std::cout << cl.get_a_string ();
.....
}
--------------------------------------
with VC++6 and it would work! Today I have tried again with VC7.1 and it
still works!
So what is the above googlegroups thread speaking about? I can't see the
difference between the code posted there and my code, which DOES
instantiate the object.
Thanks in advance
When I read it I couldn't believe that! I mean.... for years I have done
things like this for instantiating objects:
--------------------------------------
class CL
{
public:
CL (std::string s) {i_=s.length(); }
std::string get_a_string() {return std::string("wo w!");}
protected:
int i_;
};
.....
int main(....)
{
CL cl(std::string( "whatever") );
std::cout << cl.get_a_string ();
.....
}
--------------------------------------
with VC++6 and it would work! Today I have tried again with VC7.1 and it
still works!
So what is the above googlegroups thread speaking about? I can't see the
difference between the code posted there and my code, which DOES
instantiate the object.
Thanks in advance
Comment