hi i can copy text based files to other files but when it comes to images i cant copy them it gives me a distorted image.

printf("please give your archive a name:\n");
scanf("%s", &archive_name);
	
create_pointer = fopen( archive_name, "wb");	
printf("please type in the path for the file you want to archive\n");
scanf("%s", &original_file);

open_pointer = fopen( original_file, "rb");			
original_pointer=fopen(original_file,"rb");	

						
copy_pointer = fopen( archive_name,"wb")

Where's the code that copies the data?

thats all i have for the copying, the create_pointer lets the user create the file then the copy_pointer is the file that the user selected i hope that makes sense but it does work just not with jpeg it can copy text files only

copy_pointer = fopen( archive_name,"wb")
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.