Skip to main content
GameDev.net gamedev.net
🔒 Locked

C++ Classes Question

Started by SoD Jan 4, 2002 at 4:17 AM 1 replies 300+ views
Original Post
SoD
SoD
Hi, it''s possible to construct a class that can be used like a variable? In a way like the CString MFC class in Windows. Example: CString str; str="hello"; Normally i used a member function of the class that assigns the string to an internal variable like this: str.Assign("hello"); but it can be more useful using the firt version, or not? And it''s possible to do: str+=" world"; ? thank for the tips
Here we go!
EvilCrap
EvilCrap
i think that is accomplished through operator overloading

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.