string ImpLine; // import line
.
.
.
// ImpLine is filled from a text file
.
.
.
Memo->Lines->Add(AnsiString(ImpLine.c_str()));
// Memo is expecting it strings to be AnsiString so I change ImpLine to
// a standard C\C++ string with c_str() then cast to AnsiString
.
.
.
// We can do the opposite, too
ImpLine = Edit->Text.c_str();