Jump to content
  • Advertisement

Archived

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

silvermace

operators and a string class ...

This topic is 5891 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
Advertisement
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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!