I'm trying to compile an old Turbo C++ package with C++ Builder compiler (Rad Studio 10.2).
During this, I got error:
[bcc32 Error] E2357 Reference initialized with 'char', needs lvalue of type 'wchar_t'
connected with this block of code:
void __fastcall TRsEdit::KeyPress(char &Key)
{
bool ok = true;
if ( ! IsNumber(Key))
{
if (! IsTabOrReturn(Key))
ok = false;
}
if (!ok && !ComponentState.Contains(csDesigning) )
Key = 0;
TEdit::KeyPress(Key);
}
Error occurs for line: TEdit::KeyPress(Key)
This procedure is declared in Vcl.StdCtrl.hpp file as:
DYNAMIC void __fastcall KeyPress(System::WideChar &Key);
Does anyone know how deal with this problem?