J
John Doe
Please have a look at this thread:
http://groups.google.com/groups?hl=...15zU3EADHA.2280%40cpmsftngxa06.phx.gbl&rnum=2
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("wow!");}
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
http://groups.google.com/groups?hl=...15zU3EADHA.2280%40cpmsftngxa06.phx.gbl&rnum=2
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("wow!");}
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