The error means that the type of the variable you are applying the index or "[]" operator to is not a pointer, an array, or a class for which operator[] is defined.
You don't show the definition of the "myString" class, which is the type of the argument "my_str" in "flip_str". Is this really the data type/class you want?
If you chagne the type of my_str from myString to a standard String, you'll have an implementation of operator[] which allows the string contents to be indexed.
Main Topics
Browse All Topics





by: charles_klinePosted on 1997-12-11 at 11:12:11ID: 1291717
Edited text of question