00001 #include "PStream.h" 00002 00003 using namespace PLearn; 00004 00005 int main() 00006 { 00007 PIFStream in("essai2.cc"); 00008 cout << "First char: " << char(in.get()) << endl; 00009 char s[100]; 00010 int n = 10; 00011 in.read(s,n); // !!!! Ca bloque la dedans... 00012 s[10] = '\0'; 00013 cout << "Next 10 characters: " << s << endl; 00014 return 0; 00015 }