I'm using C++ Builder 2007
I'm trying to use the SetString function. The help file says it's there in namespace System, but the compiler disagrees and says it's unknown.
I've searched all BCB's include files but cannot find it...
Is there a way to use it?
Andy
SetString
Moderator: 2ffat
Re: SetString
The documentation is misleading. SetString() is an intrinsic function in the Delphi compiler, so it is not in any namespace at all.AndyPhotosBell wrote:I'm trying to use the SetString function. The help file says it's there in namespace System, but the compiler disagrees and says it's unknown.
Because it does not exist in C++.AndyPhotosBell wrote:I've searched all BCB's include files but cannot find it...
No. But then again, you don't need SetString() in C++ anyway. AnsiString (and WideString, and UnicodeString in CB2009+) has a constructor that accepts the same parameters that SetString() does, eg:AndyPhotosBell wrote:Is there a way to use it?
Code: Select all
AnsiString s;
s = AnsiString(charData, dataLen);
Code: Select all
AnsiString s(charData, dataLen);
Remy Lebeau (TeamB)
Lebeau Software
Lebeau Software