fart/distrib/distrib.cc
Josh Holtrop 0e818d1a92 added distrib infrastructure
git-svn-id: svn://anubis/fart/trunk@220 7f9b0f55-74a9-4bce-be96-3c2cd072584d
2009-04-05 13:11:44 +00:00

24 lines
350 B
C++

#include "distrib.h"
#include <fstream>
#include <string>
using namespace std;
int distrib::readHostFile(const char * filename)
{
ifstream ifs(filename);
if ( ! ifs.is_open() )
return 1;
string host;
while ( ! ifs.eof() )
{
ifs >> host;
m_hosts.push_back(host);
}
ifs.close();
return 0;
}