Oui,C'est ce que j'avais fais, mais quand je rentre le nom du fichier j'ai la console qui se plante et je ne comprend pas.
voila mon code si quelqu'un vois l'erreur qu'il me le dise
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#define TAILLE 1024
void CopieFichier(char *fichier)
{
FILE *fs;
FILE *f;
char *fichierSource;
char *memoir = (char *)malloc(TAILLE);
int longueur;
f=fopen(fichier,"r");
fs = fopen("c:\\CopieFichierSource.txt","w");
while((longueur = fread(memoir,1,TAILLE,f)) != 0)
fwrite(memoir,1,longueur,fs);
fclose(f);
fclose(fs);
free(memoir);
return ;
}
main()
{
FILE *f;
char *fichier;
printf("\nEntrez fichier a copier : ");
gets(fichier);
CopieFichier(fichier);
fflush(stdin);
fgetc(stdin);
return;
}