Advertisement
Guest User

Untitled

a guest
Feb 12th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.84 KB | None | 0 0
  1. DossierProfesseur(string FP){
  2.             ifstream str(FP.c_str(), ios::in);
  3.             cerr << "\033[33;1mError: Couldn't open \033[0m" << str << " (str)" << endl;
  4.             string i;
  5.             cout<<"hello"<<endl;
  6.             tete = new Professeur();
  7.             tete->listetudiants=new Etudiants();
  8.             tete->listecours = new Cours();
  9.  
  10.             while(getline(str,i)){
  11.                 getline(str, i);
  12.                 tete->nom = i;
  13.                 getline(str, i);
  14.                 tete->prenom =i;
  15.                 getline(str,i);
  16.                 while(i!="&"){
  17.                    
  18.                     tete->listecours->suivant = new Cours();
  19.                     tete->listecours->sigle= i;
  20.                     tete->listecours = tete->listecours->suivant;
  21.                 }
  22.                 getline(str, i);
  23.                 while(i!="&"){
  24.                     tete->listetudiants->apres=new Etudiants();
  25.                     tete->listetudiants->nom =i;
  26.                     tete->listetudiants=tete->listetudiants->apres;
  27.                 }
  28.                 tete->suivant = new Professeur();
  29.                 tete = tete->suivant;
  30.             }
  31.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement