HI. Hopefully I can resolve this now with your help.
simply, I want to write a String to file. I have been trying it with fstream. The string comes in the form of AnsiString from a c++ Edit component. Can someone provide some code to do this.
Since I cannot write a string to disk I have tried converting it to a char. The problem wih this is that I dont know how long the string is going to be. If i declare a char of say char, if i then copy this value back to edit component after reading it back from file. eg Edit1->Text=string, the edit component gets all 256 parts of the array which then shows up as rubbish if the string was only 6 long in the first place. Ideally I dont want a fixed char array.
Can someone provide some code as I am really frustrated with this.