Tarefa12/main.cpp
void parse_alliances(vector<vector<string> > &alliances, string filename){
  string line = "";
  ifstream file;

  file.open(filename.c_str());
  if(!file.is_open()){
    cerr<<"Problem while opening the file "<<filename<<endl;
    exit(0);
  }
  while (!file.eof())
    {
      vector<string> alliance;
      getline(file, line);
      parse_alliance(alliance, line);
      alliances.push_back(alliance);
    }
}
/**
 * \fn void parse_alliances(vector<vector<string> > &alliances, string filename)
 * \brief This function parses a line containing alliances between companies.
 * \param alliances A 2D vector representing the alliances. Companies on the same line are in the same alliance.
 * \param filename The name of the file containing the alliances description.
 */
\fn void parse_alliances(vector > &alliances, string filename)
\brief This function parses a line containing alliances between companies.
\param alliances A 2D vector representing the alliances. Companies on the same line are in the same alliance.
\param filename The name of the file containing the alliances description.
\ fn void parse_alliances ( vector > &alliances string filename ) \ brief This function parses a line containing alliances between companies . \ param alliances A 2D vector representing the alliances . Companies on the same line are in the same alliance . \ param filename The name of the file containing the alliances description .
void parse_alliances(vector<vector<string> > &alliances, string filename){
  string line = "";
  ifstream file;
  file.open(filename.c_str());
  if(!file.is_open()){
    cerr<<"Problem while opening the file "<<filename<<endl;
    exit(0);
  }
  while (!file.eof())
    {
      vector<string> alliance;
      getline(file, line);
      parse_alliance(alliance, line);
      alliances.push_back(alliance);
    }
}
void parse_alliances ( vector < vector < string > > & alliances , string filename ) { string line = " " ; ifstream file ; file . open ( filename . c_str ( ) ) ; if ( ! file . is_open ( ) ) { cerr << " " << filename << endl ; exit ( 0 ) ; } while ( ! file . eof ( ) ) { vector < string > alliance ; getline ( file , line ) ; parse_alliance ( alliance , line ) ; alliances . push_back ( alliance ) ; } }
\fn void parse_alliances(vector<vector<string> > &alliances, string filename)
 \brief This function parses a line containing alliances between companies.
\ fn void parse_alliances ( vector<vector<string > > &alliances string filename ) \ brief This function parses a line containing alliances between companies .