![]() |
| ||
| Help: fwrite, I want to write forward pointer address in present file pointer I wrote the following function and it is working fine, but my problem is i want to write forward pointer address in present pointer field. I will explain in code. please check line numbers 10, 11, 12, 13 in the following code.. void create_fbeCodeDat() |
| ||
| Re: Help: fwrite, I want to write forward pointer address in present file pointer >i want to write forward pointer address in present pointer field. If I understand your problem correctly, you have two immediate options:
|
| ||
| Re: Help: fwrite, I want to write forward pointer address in present file pointer It's absolutely senseless operation to write memory addresses (pointer values) onto external files. Addresses are not persistent values... Better reread your task specifications... |
| ||
| Re: Help: fwrite, I want to write forward pointer address in present file pointer Quote:
How to get the current address |
| ||
| Re: Help: fwrite, I want to write forward pointer address in present file pointer 1 Attachment(s) How to get the current address. Actually first i leave some empty space to write the offset address. After writing data from buffer, i have to calculate the offset address and have to write back the offset address.. i will give you the picture, how i have to write dat file. see atachment.. |
| ||
| Re: Help: fwrite, I want to write forward pointer address in present file pointer 1 Attachment(s) It's an array of offsets into the file, not addresses as such. Since you know how many there are, you can calculate the size of this table, and populate it with what the effective start positions of each buffList[buf].fbCodeAddr will be written to (it's just an initial constant, and a sum of lengths) Oh, and try to use portable image formats in future. |
| ||
| Re: Help: fwrite, I want to write forward pointer address in present file pointer Thanks Salem, I got it.. Actually i was confused with offset and address. Now i got it what is offset. My code is working fine.. Code is as follows. please suggest me if there is any better idea than the following code.. void create_fbeCodeDat() |
| All times are GMT -4. The time now is 1:51 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC