Slimelite BBS

Overloading operator []

Back to EMULATE

From Boris Boehlen · 1996-04-09 06:00 · #73684 in EMULATE

Hi,

I'd like to overload the operator [] to do the following:

  String x("foo");

  x[2] = 'e';     // -> x == "foe"
  x[3] = 's';     // -> x == "foes"

Does anyone know how I can achieve this?

Many thanx in advance

   Boris


--- CrossPoint v3.1
 * Origin: Mariko's BBS (2:2433/608.15)