Migrating from BuilderC++ 2006 to 2010 FAILS

Hi,

I have been using BuilderC++ since version 4 and never had this backward incompatibility issue but now, with 2010, I cannot compiler my 2006 projects!

I keep on getting errors:

[BCC32 Error]: E2354 Two operands must evaluate to the same type

The line of code is:
AnsiString value2= (ed2) ? ed2->Text: sEmptyString ;

where ed2 is a TEdit and sEmptyString is const AnsiString.

Text property for TEdit is no longer an AnsiString?


--------------------------------------------------------------------------------

Also, I am getting errors such as:
[BCC32 Error] E2034 Cannot convert 'wchar_t *' to 'const char *'
[BCC32 Error] E2342 Type mismatch in parameter 'lpFile' (wanted 'const char *', got 'wchar_t *')

the line of code is:
String St = lblHyperLink->Caption;
ShellExecute(Handle,"open", St.c_str(),0,0,SW_SHOW);

AnsiString.c_str() is not returning a
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories