Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) FileToStringList

 

FileToStringList is a file I/O code snippet to obtain the contents of a file as a TStringList.

 

#include <memory>

std::auto_ptr<TStringList> FileToStringList(const std::string& filename)
{
  std::auto_ptr<TStringList> s(new TStringList);
  s->LoadFromFile(fileName.c_str());
  return s;
}

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict