C++/File/istrstream

Материал из C\C++ эксперт
Перейти к: навигация, поиск

Read the contents of any type of array

<source lang="cpp">

  1. include <iostream>
  2. include <strstream>

using namespace std; main() {

 char s[] = "text and binary mixed\23\22\21\a\t\n";   
    
 istrstream ins(s);   
    
 char ch;   
    
 while (!ins.eof()) {   
   ins.get(ch);   
   cout << ch;   
 }   
    
 return 0;   

}


 </source>