Well with a std::string, it would be
std::string filename = "file.txt";
std::string = "c:\\" + filename;
fp = fopen( filename.c_str(), "w+" );
Does your ansiString come with a suitable method to return a const char * equivalent?
Well with a std::string, it would be
std::string filename = "file.txt";
std::string = "c:\\" + filename;
fp = fopen( filename.c_str(), "w+" );
Does your ansiString come with a suitable method to return a const char * equivalent?
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Hi
i did something like this but dont work:
FILE *fp;
AnsiString FileName;
FileName=Edit1->Text;
FileName="c:\\"+FileName;
fp=fopen(FileName.c_str(),"w+");
fclose(fp);
What i have to change??? Help..... Do i have to use AnsiString and make it Char???
be more specificOriginally Posted by Leite33
what interface AnsiString provides?
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler