473,499 Members | 1,579 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

rewind

2 New Member
I'm programing in c, in the first part of the program I write data to a file, using fopen() and fclose(). In the second part I am trieng to read the file, again, using fopen() and fclose() in reading mode. the program start reading from the last raw. using rewind() does not help. how can I start reading data from begining of file?
Sep 29 '06 #1
3 2939
zeny
44 New Member
Maybe fscanf() will help, try it.

regards
Sep 29 '06 #2
menashe
2 New Member
Thank you
fscanf() &fprintf() is whatIm doing. still I think it has to do with rewind(), as if the rewind() take me back to the last raw instead to the begining of the file.
menashe
Sep 30 '06 #3
Banfa
9,065 Recognized Expert Moderator Expert
try using fseek instead of rewind, it will give an error indication if it can't set the file pointer to the start of the file. Additionally you need to make sure you have opened the file to read in the correct mode.
Sep 30 '06 #4

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

Similar topics

4
7687
by: **Developer** | last post by:
Assume that the first line of a file is read with: InputLine = LineInput(FileNum) I believe a file can be rewound as follows: (So that the first line can be reread) FileClose(FileNum)...
0
1080
by: Charles D Hixson | last post by:
I was reading through old messages in the list and came up against an idea that I thought might be of some value: "Wouldn't it be a good idea if one could "rewind" an iterator?" Not stated in...
24
3376
by: Olaf \El Blanco\ | last post by:
Where is exactly neccesary to put "rewind(stdin)"? After a printf? Before a scanf? I have a lot of problems with strings... If somebody know any good document, please let me know where is... ...
3
4042
by: Rajorshi Biswas | last post by:
Hi all, I'm aware that this might not be a "C-specific" question, if so, please let me know which group is the most appropriate for this kind of question. This is a question on unix...
5
3525
by: gp | last post by:
i am implementing Iterator in a class, I have pretty much copied the code from php.net on Object Iteration. Adding all the normal methods for the task...rewind, current, next, etc. I was...
1
1796
by: TuMultimedia | last post by:
Hello, I make audio slideshows in Flash. They are for non-profits, sometimes they are 8 minutes long and people need to rewind, fast foward to parts on my website. Usually, I just export a simple...
1
3782
elamberdor
by: elamberdor | last post by:
Hi All! Have a complex roll in / roll out button (ag_mc) that unwraps, then re-wraps a chocolate upon roll in - roll out. However - to complicate things, I would also like another button ( ag_desc)...
0
7130
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7007
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
7220
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...
1
6893
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5468
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,...
1
4918
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3090
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
295
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.