473,399 Members | 2,159 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Rewrite a open file?

Is there a way to rewrite a open file in C? So say every time I want to rewrite to a file rather then having to reopen it I can just rewrite the contents inside. Any help is greatly appreciated.
Mar 9 '10 #1

✓ answered by Banfa

As long as the file was opened for writing in the first place all you have to do is "seek" to the beginning of the file again.

Check your library documentation for seek.

1 2760
Banfa
9,065 Expert Mod 8TB
As long as the file was opened for writing in the first place all you have to do is "seek" to the beginning of the file again.

Check your library documentation for seek.
Mar 9 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Bfons | last post by:
Hello all, I am trying to write a script (without much luck) that will modify certain lines in a sendmail file. Here is what is in the file: SMailerToTriple=95 R< > $* ...
5
by: HALLES | last post by:
HI ! Is there a way to write append rewrite a XML Multilingual file. Two parallele aims Multilingual and Xml File format or Xml Lile file Format. Is there an editor to do that. HALLES .
5
by: T | last post by:
Hi group, I'm trying to create a temporary replacement scheme for a particular url that gets generated all over an existing app. It would be very difficult to find every spot where the url gets...
3
by: Bill Nguyen | last post by:
When my app attempts to save a particular file in the same VB session, I got an error message . If I close the app and run again, the file is overwritten ok. I guess I need to close the file...
7
by: Stan Canepa | last post by:
I am looking for good documentation to help support rewriting a VB 6 app in Dot Net. I looking for things like VB 6 being unsupported in March 2008, general performance improvements, at what point...
5
by: Lupus | last post by:
Hello everybody In apache I used a feature called a "Rewrite rule" inside a .htaccess file to process the URL : i.e. http://www/mypage.html =http://www/page.php?page=mypage Now I'd like to do...
18
chunk1978
by: chunk1978 | last post by:
hi everyone. i just started learning how to dynamically show/hide elements with a checkbox toggle. i would like to know if it's possible to delete/rewrite elements instead of simply show/hide...
11
kirubagari
by: kirubagari | last post by:
Public Sub ReWrite_Open_File(ByVal FileNo As Long) Dim FileSize As Long, Buffer() As Byte ' PART 1: Read the file. FileSize = LOF(FileNo) ' Determine how large the file is (in bytes). ...
4
by: Harsh Trivedi | last post by:
Hi, We have implemented URL rewriting in our site. It all went OK till home page links. When we click on home page category control, where we have implemented rewriting, it works ok, and open...
3
by: Joe | last post by:
Hello, I currently have a file system where images and assets are stored in a directory like this: http://www.domain.com/assets/media/CLIENT_NAME/uploads/CLIENT_DIR/CLIENT_FILES Which holds...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.