Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!munnari.oz.au!goanna!minyos.xx.rmit.oz.au!s892992 From: s892992@minyos.xx.rmit.oz.au (Bossman) Newsgroups: comp.lang.c++ Subject: Re: BC++ and String class?? Message-ID: <1991May14.055103.6805@minyos.xx.rmit.oz.au> Date: 14 May 91 05:51:03 GMT Article-I.D.: minyos.1991May14.055103.6805 References: <91131.195732ACPS2924@Ryerson.Ca> Organization: RMIT Computer Centre, Melbourne Australia. Lines: 34 ACPS2924@Ryerson.Ca writes: >I'm having a slight problem with BC++. Following is a short code sample >from my header file. I somehow keep getting the same error with String. >What am I doing wrong ?? >class dbField >{ >public: > dbField(String name) > virtual char* toString(void) >private: > String fieldName; >}; >ERROR: Cannot find 'String::String()' to initialize field 'fieldname' .... Hmm. This one has me stumped also. I checked the example code and it does exist like you say, but it makes no sense. If you examine the String class provided by the class library you will notice that there is not constrcutor defined with no arguments (String::String()). Thus the error is understandable since you are attempting to call a non-existant constructor. I am not very impressed with this class library. The string class is barely useable, and there seems to be a lot of unnecessary padding in the code. I have also found some rather blatent errors. In many cases some of the functions that it purports to contains do not exist (the operator String() in the Date and Time classes for example). One other thing I noticed, is that when you initialise and iterator using the InitIterator() member function for the List class, it does not set up the Restart variable correctly. A call to restart() for the iterator could put you anywhere! See ya, Kendall Bennett