Y2K Diary [ 01.03.00 ]

61. Programming (Part 2)

C.  First binary language tackling graphics in an acceptable format.
C++.  Everything else seems to be based upon that.

                                                                               C++

class String {
  char *char_ptr;   // pointer to string contents
  int length;          // length of string in characters
public:
  // three different constructors
  String(char *text);     // constructor, existing string
  String(int size = 80);  // default empty string
  String(String &Other_String);    // for assignment
                          // from another object of this class

  ~String() {delete char_ptr;};      // inline destructor
  int Get_len (void);
  String operator+ (String &Arg);
  void Show (void);
};

                                                                                     


Visual Basic.  PC basics in visual design. NP


[ submit entry ]      [ contents ]      [ previous ]  [ next ]