Beispiel #1
0
int main()
{
  auto names = ReadNames("dist.female.first");

  std::vector<std::string> tests;
  tests.push_back("LINDA");
  tests.push_back("PETER");
  tests.push_back("DOROTHY");

  for(auto test : tests)
  {
    std::cout << test << " " << TestName(names, test) << std::endl;
  }

  return 0;
}
long CMUSHclientDoc::ReadNamesFile(LPCTSTR FileName) 
{
  if (strlen (FileName) == 0)
    return eNoNameSpecified;

	try
	  {
    ReadNames (FileName, true);
    }
	catch (CException* e)
	  {
		e->Delete();
    return eCouldNotOpenFile;
	  }

	return eOK;
}   // end of CMUSHclientDoc::ReadNamesFile