Link to home
Start Free TrialLog in
Avatar of NJordan72
NJordan72

asked on

operator=(AnsiString) not inheting!

Hello-

I am using Borland C++ Builder 5, and have run into a bit of a problem.  I have extended the TComboBox class to add a little bit of functionality that I needed.  That worked without a hitch.  The problem that I am running into is that the opeartor= does not seem to be working in the extended class.

If i write a line like:
WebgistixPackageType[currentPosition] = (WebgistixPackageType->MoreItems->Strings[WebgistixPackageType->ItemIndex]);

I get an error like:
[C++ Error] WebgistixWarehouse.cpp(820): E2285 Could not find a match for 'WebgistixComboBox::operator =(AnsiString)'

So it seems that I need to overload (or atleast create) the '=' operator for AnsiString.  Can someone give me some help on this?  Thanks!

Nick
ASKER CERTIFIED SOLUTION
Avatar of DrDelphi
DrDelphi

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NJordan72
NJordan72

ASKER

DrDelphi-

That just brings out this error:

[C++ Error] WebgistixWarehouse.cpp(711): E2285 Could not find a match for 'WebgistixComboBox::operator =(TStrings)'

I can't figure out why the operator= isn't being inherited, by WebgistixComboBox.
Actually, you are sorta right.  I was supposed to be assigning the value to an array that was similarly named.  In my haste i typed in the wrong value.  Bad naming conventions == bad programming!  Thanks!