The code that Yves posted does not compile using the Comeau compiler:
Regards,Code:#include <string> using namespace std; class someclass { private: string m_string; public: someclass(string& str){m_string = str;} }; int main() { someclass* cinst = new someclass(string("test")); delete cinst; return 0; } ComeauTest.c", line 17: error: no instance of constructor "someclass::someclass" matches the argument list The argument types that you used are: (std::string) someclass* cinst = new someclass(string("test")); ^ 1 error detected in the compilation of "ComeauTest.c".
Paul McKenzie




Reply With Quote