Advertisement

Does anyone use Microsoft's CString class?

Started by July 19, 2000 02:06 PM
12 comments, last by Trajar 24 years, 5 months ago
quote:
blue-lightning


Providing you pass your strings by const&, the different probably wont be that big in a game. string will allocate more memory that it needs, so if you append to the string it doesn''t need to allocate more memory.
Blue, don''t see why they should be significantly slower than a simpler string. The only added overhead is checking and incrementing a use-count. In fact, copy constructors and assignment operators should be significantly faster, as they only increment a use-count.

(my byline from the Gamedev Collection series, which I co-edited) John Hattan has been working steadily in the casual game-space since the TRS-80 days and professionally since 1990. After seeing his small-format games turned down for what turned out to be Tandy's last PC release, he took them independent, eventually releasing them as several discount game-packs through a couple of publishers. The packs are actually still available on store-shelves, although you'll need a keen eye to find them nowadays. He continues to work in the casual game-space as an independent developer, largely working on games in Flash for his website, The Code Zone (www.thecodezone.com). His current scheme is to distribute his games virally on various web-portals and widget platforms. In addition, John writes weekly product reviews and blogs (over ten years old) for www.gamedev.net from his home office where he lives with his wife and daughter in their home in the woods near Lake Grapevine in Texas.

Advertisement
I find it amusing that Microsoft made their own specific string class... now they''re going onto their own specific programming language.

They should make a whole new set of variable types!!!:

microsoftINTtm count;
microsoftCHARtm key;
microsoftFLOATtm speed;

Soon Starbucks and Microsoft will merge, and we''ll all be getting Microsoft(tm) brand coffee... eww..

Maybe I''m just going crazy or something.

- Goblin
"A woodchuck would chuck as much wood as a woodchuck could if a woodchuck could chuck wood. Deal."
- The Goblin (madgob@aol.com)
In MS''s defense, CString existed years before there was any kind of standard string class. CString shipped with MFC 1.0, circa 1991. Ditto for the string and collection in Borland''s BIDS library, circa 1990.

Around that time, the only standard class of any type was "complex", and that''s only because it was detailed in Stroustrup''s book.

(my byline from the Gamedev Collection series, which I co-edited) John Hattan has been working steadily in the casual game-space since the TRS-80 days and professionally since 1990. After seeing his small-format games turned down for what turned out to be Tandy's last PC release, he took them independent, eventually releasing them as several discount game-packs through a couple of publishers. The packs are actually still available on store-shelves, although you'll need a keen eye to find them nowadays. He continues to work in the casual game-space as an independent developer, largely working on games in Flash for his website, The Code Zone (www.thecodezone.com). His current scheme is to distribute his games virally on various web-portals and widget platforms. In addition, John writes weekly product reviews and blogs (over ten years old) for www.gamedev.net from his home office where he lives with his wife and daughter in their home in the woods near Lake Grapevine in Texas.

This topic is closed to new replies.

Advertisement