Monday, July 21, 2008

Missing The 'String' data type in C++

After working with languages like Java and C# for some time, one tends to assume to comfort of the 'String' data type. Coming back to some hard-core programming in C++ after some time, I wished that C++ be evolved into something that is more programmer friendly but at the same time maintains the speed and efficiency that is currently provides..

With many OpenSource and other wise initiatives to use modern languages for high-end development like in writing the new-gen OSes, the forte of C++, pointers, seems to be a mixed blessing.

4 comments:

Kevin said...

Hi, Have you tried the C+ Standard Library std::string class? It should do the trick!

bhupa said...

I can’t comment on this, because it has been a lot of time, since I had worked in C++. Now I only work in JAVA and my concepts are clear.

===========

bhupa

worldinfo

Sharath A.V said...

The C++ STL string has been around ever since the C++ was standardized in 1998. So its been already a decade. The chances are that you were using a a very old/pre-standard compiler like Turbo C. There are lots of better compiler than that and many of them are freely available.
Do read this once:
http://prokutfaq.byethost15.com/Avoid16bitTurboCppCompilers

Rand said...

The problem is that most C++ programmers are so clanish, complacent, and speed-obsessed (even though they usually lose speed with ad hoc solutions), that they rarely venture out of the 1 or 2 libraries they use desperately require to even pick up the standard library. Because of this, C++ has lost ground to other languages based on their convenient build-in libraries, despite the fact that C++ could enable far more extensive libraries if programmers just went out there and looked! Still I can't claim that I'm not chronically lazy and I await eagerly the day when a C++ compiler comes out with not only in-build std support, but in built boost and OpenGL support.