![]() |
|
|||||||
|
|
Thread Tools | Search this Thread | Rate Thread |
|
#1
|
|||
|
|||
copying a portion of Binary file into another Binary fileHi friends,
I have got a binary file with large no of records. I have to copy a portion of that file in another binary file.I am trying to read from the first one and write into the second oneusing for loop for certain no. of records but its not working. Can I do like this?Can anyone help me out? |
|
#2
|
|||
|
|||
|
Quote:
Yes, you can do it that way. May be you could post the code you have written so far for copying with the problem that you are facing with it. |
|
#3
|
||||
|
||||
Try to give an example code.Quote:
Just a short example : CPP / C++ / C Code:
This is the basic idea. Post your code and errors for further help. Best regards, Kobi. |
|
#4
|
|||
|
|||
|
I wrote this file copy program a while back using low-level I/O functions creat(), open(), read() and write(). Source file is read in chunks of predefined size and written into the new file. New file, if not available is created by the program.
CPP / C++ / C Code:
I have tested this on linux. Quote:
|
|
#5
|
|||
|
|||
|
I have written this code
CPP / C++ / C Code:
But this is not working .somethimg else is getting written in the other file Last edited by LuciWiz : 25-Jul-2005 at 01:29.
Reason: Please insert your C code between [c] & [/c] tags
|
|
#6
|
|||
|
|||
|
http://www.eskimo.com/~scs/C-faq/q12.30.html
[edit]Why it's bad to use feof() to control a loop -- but you got it backwards anyway. |
Recent GIDBlog
Stupid Management Policies by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Airport Log program using 3D linked List : problem reading from file | batrsau | C Programming Language | 11 | 29-Feb-2008 08:44 |
| CD burner wont burn!! | robertli55 | Computer Hardware Forum | 1 | 18-Jun-2004 11:53 |
| Yet another CD burner problem: Lite-On LSC-24082K | Erwin | Computer Hardware Forum | 1 | 22-May-2004 12:28 |
| Re: Programming Techniques | WaltP | C Programming Language | 0 | 10-Mar-2004 00:56 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The