Author: Dann Corbit
Date: 10:30:26 01/24/03
Go up one level in this thread
On January 24, 2003 at 10:23:47, Tom Likens wrote: >On January 24, 2003 at 03:22:37, Steffen Jakob wrote: > >>On January 24, 2003 at 03:15:55, Joshua Haglund wrote: >> >>>What do I need to #include to use strlen? >>>I've tried almost everything I can think of! >>>(C++) >> >>Don't use strlen() in C++ but std::string and its member function length(). :-) >> >>Greetings, >>Steffen. > >The only caveat to this, is be careful if you are using this >in any loop intensive code that needs to be fast. A number >of the C++ implementations of the string class are dog slow. > >If you're using this for interface code that doesn't need to >be all that fast then I think using a string is definitely >the way to go. Otherwise, you may want to time things using >a good profiler, and make your decision based on the results. > >Oh, and to answer your original question use <cstring>. Hearty STL recommendation: http://www.stlport.com/download.html The STLPort version is very nice. The Microsoft version is bletcherous and treacherous by comparison. Not sure about other implementations.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.