Search code examples
c++stringc++builderc++builder-5

Borland Builder 5 c++ Strings can't index at 0


I am trying to do a simple string access at 0, and for some reason I get an out of bounds error in Borland Builder 5 C++.

Has anyone found a way around this? Is there a special type of string that the Borland Compiler uses?


Solution

  • Yes, It is a special String type used by Borland C++ Builder. Variables of this type are indexed from 1.

    I know that it may be a bit confusing - I also couldn't believe it for a long time.