- /*
- *
- ** @Authors : Tylos
- **
- ** @Date : 25/01/2002
- **
- ** @Version : V1.0
- **
- ** @Synopsis : Permet de copier un fichier dans un autre fichier
- **
- ***/
- #include <iostream>
- #include <string>
- #include <fstream>
- using namespace std ;
-
-
- namespace
- {
-
- void Copie (void)
- {
- ifstream exoi("fichier.cxx"); // le fichier en lecture
- ofstream exoo("fichier.cxx.copy"); // le fichier où écrire
- string S;
- string R;
- for (getline(exoi,S) ; !exoi.eof() ; getline(exoi,S)) R.append(S).append("\n");
- exoo << R << endl;
- } // Copie()
-
- } // namespace anonyme
-
- int main (void)
- {
- Copie();
-
- return 0;
-
- } // main ()
/*
*
** @Authors : Tylos
**
** @Date : 25/01/2002
**
** @Version : V1.0
**
** @Synopsis : Permet de copier un fichier dans un autre fichier
**
***/
#include <iostream>
#include <string>
#include <fstream>
using namespace std ;
namespace
{
void Copie (void)
{
ifstream exoi("fichier.cxx"); // le fichier en lecture
ofstream exoo("fichier.cxx.copy"); // le fichier où écrire
string S;
string R;
for (getline(exoi,S) ; !exoi.eof() ; getline(exoi,S)) R.append(S).append("\n");
exoo << R << endl;
} // Copie()
} // namespace anonyme
int main (void)
{
Copie();
return 0;
} // main ()