Archived

This topic is now archived and is closed to further replies.

operators and a string class ...

This topic is 5674 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, im making a string class for an engine im coding. i want to be able to pass a fstring class to a function which accepts ''char*'' as its params, similar to the CString Class in MFC, ne help thanx. class fstring { public: ... operator ... operator ... }; void doSomething(char*); ... void DoingSomethingElse(void) { fstring Something; ... doSomething(Something); } get the idea ??? thanx again!

Share this post


Link to post
Share on other sites
Oh boy, this is gonna start another war.

Read Scott Meyer''s "Effective C++" or search the arhivces for implicit conversion on why you don''t want to provide such a conversion operator.

Share this post


Link to post
Share on other sites