Path: utzoo!utgpu!utorvm!ryerson!acps2924 Organization: Ryerson - Academic Computing Services Date: Saturday, 11 May 1991 19:57:32 EST From: Message-ID: <91131.195732ACPS2924@Ryerson.Ca> Newsgroups: comp.lang.c++ Subject: BC++ and String class?? 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 ?? //-------------------------------------------------------------------------- #ifndef __DBFIELD_H #define __DBFIELD_H #ifndef __STDLIB_H #include #endif #ifndef __CLSDEFS_H #include #endif #ifndef __CLSTYPES_H #include #endif #ifndef __SORTABLE_H #include #endif #ifndef __STRNG_H #include #endif class dbField { public: dbField(String name) { fieldName = name; }; virtual char* toString(void) { cerr << "\nSorry but no toString exists for this dbField\n"; exit(1); return (char*) NULL; }; private: String fieldName; }; #endif /--------------------------------------------------------------------------- ERROR: Cannot find 'String::String()' to initialize field 'fieldname' .... But in the example directry.cpp it somehow gets away with it. Why ??????? Peter +----------------------------------------------------------------------+ acps2924@ryerson.ca ! Who is the ! If plumbers designed toilets like ! user,pray, ! software professionals design tools, ! and who is ! we'd be up to our knees in crap. ! the used ? ! - Charles A. Rovira +----------------------------------------------------------------------+