#ifndef __lnv3_string_h__ #define __lnv3_string_h__ // ============================================================ // // mstring.h // // Copyright 1999, Dennis Meilicke // // ============================================================ // // Description // // Minimal string class, to get around the lack of one under // our AIX compilers. // // ============================================================ #include #include class string { public: string() { buffer[0] = '\0'; } string( const char* str ) { strcpy( buffer, str ); } char operator[]( size_t index ){ return buffer[index]; } short operator==( const char *str ) { return ( strcmp( buffer, str ) == 0 ); } friend ostream& operator << (ostream& o, const string& str); friend istream& operator >> (istream& i, string& str); private: char buffer[ 200 ]; }; ostream& operator<<(ostream& o, const string& s) { o << s.buffer; return o; } istream& operator>>(istream& i, string& s) { i >> s.buffer; return i; } #endif