/** * @File : exo_04.cxx * * nsFctShell::FileCopy() * * donneTailleMorceau **/ #include #include #include // O_RDONLY #include "CExc.h" #include "nsSysteme.h" // Open(), Write(), Close() using namespace nsSysteme; // Open(), Write(), Close() using namespace std; int main (int argc, char * argv []) { try { if (2 != argc) throw CExc ("main()",string ("Usage : ") + argv [0] + " "); int fD; fD = Open(argv[1],O_WRONLY|O_CREAT,0600); Write(fD,"b",1); const string msgstr("Andreea Dragut vous souhaite bonne chance."); int n(msgstr . size()); Write(fD,&n,sizeof(int)); for(int k(0);k