Link to home
Start Free TrialLog in
Avatar of c567591
c567591

asked on

VC to C++ Builder code conversion

I am trying to convert some code from VC to C++ Builder 5 pro.

For the line:
operator string() const;
I get these errors:
Error E2076 .\strtok.h 32: Overloadable operator expected
Error E2040 .\strtok.h 32: Declaration terminated incorrectly

Farther down in the implementation:
inline StrTok::operator string() const
{
  if (curToken)
      return string(curToken,curTokenLength);
  return string("");
}
I get these errors:
Error E2076 .\strtok.h 59: Overloadable operator expected
Error E2040 .\strtok.h 59: Declaration terminated incorrectly

This is a small and relatively uncomplicated class, but I am stuck on what the Borland C++ Builder compiler is looking for.

What should I replace these with?
I tried AnsiString(), but it gave the exact same errors.
ASKER CERTIFIED SOLUTION
Avatar of efn
efn

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 c567591
c567591

ASKER

Well, you just got some easy points.  ;)
Thanks for the quick answer that worked!