A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876

datei auslesen - mcpaste

datei auslesen

Von DerCppK0nA, 10 Jahre vorher, geschrieben in Plain Text, aufgerufen 1'579 mal.
URL https://mcpaste.de/view/4ce29652 Einbetten
Paste herunterladen oder Rohtext anzeigen
  1. #include <iostream>
  2. #include <fstream>
  3. #include <String>
  4. #include <vector>
  5. using namespace std;
  6.  
  7. //ifstream data;
  8. vector <int> ausgabe;
  9. void datenlesen(string);
  10. void main(void)
  11. {
  12.         string dateiName;
  13.         cin >> dateiName;
  14.         datenlesen(dateiName);
  15.         for(int i=0;i<ausgabe.size();i++){
  16.                 cout<<ausgabe.at(i);
  17.         }
  18.         system("pause");
  19. }
  20.  
  21. void datenlesen(string dateiName){
  22.         ifstream data;
  23.         data.open(dateiName);
  24.  
  25.         if(!data){
  26.                 cout << "Konnte Datei " << '"' << dateiName << '"' << " nicht lesen." <<endl;
  27.         }else{
  28.                 char out[80];
  29.                 while(true){
  30.                         data.getline(out,100,'.');
  31.                         if (!*out){
  32.                                 cout << "End of file.";
  33.                                 break;
  34.                         }
  35.                         cout << out << endl;
  36.                         ausgabe.push_back(atoi(out));
  37.                 }
  38.         }
  39. }

Antwort auf "datei auslesen"

Hier kannst Du auf den Paste von oben antworten

A PHP Error was encountered

Severity: 8192

Message: strpos(): Non-string needles will be interpreted as strings in the future. Use an explicit chr() call to preserve the current behavior

Filename: database/DB_driver.php

Line Number: 1876