I have a question regarding Borland C++ Builder. I am writing a program that needs to access individual lines of a TStringList and turn each line into an AnsiString. Is there a method of either TStringList or AnsiString similar to getline() but for TStringLists? Or is there another method in some other class that allows one to do this?
I figured out the problem (kind of a roundabout way though). For anyone that needs to know how to do this, I put the steps below:
1. Make a memo (if you need it to be invisible, then you can do that.)
2. Add strings to the TStringList of the memo (via anything. Typing, file import, etc.)
3. Use the code below to turn up the number of lines in the TStringList in integers:
Memo1->Lines->Count;
4. Access each individual line using this code:
Memo1->Lines->Strings[NUMBER OF LINE]
In which the Memo1 is the name of the memo and NUMBER OF LINE is the number of the string you are trying to access.