
Originally Posted by
Ixion
C++ does . C doesn't because there is no such datatype as a "string". It's just an array of char types (and char is really just a small int). Those languages such as VB Java and C++ that pretend to have a string type really just define a very large array of chars.
That's why C (and Cobol! ) are good. What you see is exactly what you get.
I doubt that std::string does that, more likely it just adds "new" bits as required. oh and lets not overlook the irritating little terminating zero shall we with char type. And std::string is v v fast even compared with C char pointer handling.
"Old" cobol was just a file processing language, optimised for reading and writing files. Hardly low level, and not anything like C, maybe they changed it? Just remember those packed decimal fields!! aaarrgghh.
Note to myself, avoid turning this into an "I've been everywhere man" thread.
Get your motor runnin, head out on the Highway ....
Bookmarks