String classes.


R. Clayton (rclayton@clayton.cs.monmouth.edu)
Wed, 17 Jan 2001 19:01:09 -0500 (EST)


Is it ok if I use the String class I wrote for 503 instead of using an array of
characters or the string.h library?

  Three answers:

   1 You should only use char * strings only when forced to by the particular
     situation (such as when dealing with command-line argments); you should
     never use char * strings when you don't have to.

   2 The choice between using string.h and your string class is up to you. I
     recommend you use string.h: it's part of the standard, it's got a lot of
     functions and operations defined and documented (see Chapter 19, Class
     String and String Stream Processing in Deitel and Deitel), and it's been
     used and worked on by lots of people so there's a good chance string.h
     will work without errors and perform well under a wide range of uses.

   3 Generally speaking, you can use any of your own toolkit libraries,
     functions, and classes as you see fit; you may also use the libraries,
     functions and classes supported by whatever system you're working on
     (however, remember it's your responsibility to make sure your code
     compiles and runs on the test solaris system).

     The problems that you'll be working on are complicated enough that I doubt
     any particular generic library or class will cover more than a small
     fraction of the problem.



This archive was generated by hypermail 2.0b3 on Thu May 17 2001 - 12:00:05 EDT