Browse Source

Fix inaccurate variable name for stream

DricomDragon 4 years ago
parent
commit
234e59f335
1 changed files with 8 additions and 8 deletions
  1. 8 8
      braveCorn/main.cpp

+ 8 - 8
braveCorn/main.cpp

@@ -185,18 +185,18 @@ int main()
     }
 
     // Choix de la mort
-    ifstream monCul("Phrases.txt");
-    monCul.seekg(0,ios::end);
-    taille = monCul.tellg() ;
+    ifstream fileStream("Phrases.txt");
+    fileStream.seekg(0,ios::end);
+    taille = fileStream.tellg() ;
     nbRand1 = rand () % (taille-11);
-    monCul.seekg(nbRand1, ios::beg);
+    fileStream.seekg(nbRand1, ios::beg);
 
     do{
-        monCul.seekg(0, ios::cur);
-        monCul.get(lettre);
+        fileStream.seekg(0, ios::cur);
+        fileStream.get(lettre);
     } while(lettre != refe);
 
-    getline(monCul,phraseDeVictime);
+    getline(fileStream,phraseDeVictime);
 
     // Test de la mort pour affichage
     if( Caracteristique[1][2] <= 0 ){
@@ -218,7 +218,7 @@ int main()
         }
     }
 
-    monCul.close();
+    fileStream.close();
 
     return 0;
 }