Now heres a challenge. I've sort of asked about the same thing before but no one could give me an ansver on how it is so. (PROBLEM: function does not return what it's supposed to.)
The ansver for why I use AnsiString is because it's more "workable" with all those objects which Borland offers. Still I have a pointer to a char since that's what demands as an argument. BTW itsName is private and #include "fstream.h" is in the objects header.
AnsiString TFileHandle::Load() const
Length = File.tellg();
Text = new char[Length + 1];
Text = '\0';
Text[Length + 1] = '\0';
Return = Text;
delete  Text;
Now why is it that what thÝs function return is what's in the file PLUS a few other REAL strange "signs" (with a ShowMessage I have tryed what Text equals just before Return = Text but allso there it have the same odd signs and I kind of expect read to work). Other then that delete  Text give me an error which doesn't make ANY sence since the AnsiString's operator=(char*) copys what's in the array it doesn't just point at it.
Now can anyone ansver BOTH questions?