473,569 Members | 2,772 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

finish a file

how the program knows when a file is finsihed, mmm?

Nov 12 '06 #1
18 1779
"panig" <pp************ ********@yahoo. co.idwrote:
how the program knows when a file is finsihed, mmm?
When it is closed.

--
To send me email, put "sheltie" in the subject.
Nov 12 '06 #2
don't close it if processing isn't finished yet.
panig wrote:
how the program knows when a file is finsihed, mmm?
Nov 12 '06 #3
and then ?

Daniel T. wrote:
"panig" <pp************ ********@yahoo. co.idwrote:
how the program knows when a file is finsihed, mmm?

When it is closed.

--
To send me email, put "sheltie" in the subject.
Nov 12 '06 #4
panig wrote:
and then ?
What does your tutorial say about fstream? What examples does it show? Do
any of them have "eof" in them?

--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!
Nov 13 '06 #5
"panig" <pp************ ********@yahoo. co.idwrote in message
news:11******** **************@ h48g2000cwc.goo glegroups.com.. .
how the program knows when a file is finsihed, mmm?
while ( mystream >MyVar )
{
// process MyVar
}
mystream.close( );

or
while (std::getline( mystream, mystring) )
{
// process mystring
}
mystream.close( );
Nov 13 '06 #6
On Mon, 13 Nov 2006 08:10:15 -0800, "Jim Langston"
<ta*******@rock etmail.comwrote :
>"panig" wrote:
>how the program knows when a file is finsihed, mmm?

while ( mystream >MyVar )
{
// process MyVar
}
mystream.close ();

or
while (std::getline( mystream, mystring) )
{
// process mystring
}
mystream.close ();
After close() check the stream state. Otherwise you don't know "when a
file is finsihed".
Nov 13 '06 #7
"Roland Pibinger" <rp*****@yahoo. comwrote in message
news:45******** *******@news.ut anet.at...
On Mon, 13 Nov 2006 08:10:15 -0800, "Jim Langston"
<ta*******@rock etmail.comwrote :
>>"panig" wrote:
>>how the program knows when a file is finsihed, mmm?

while ( mystream >MyVar )
{
// process MyVar
}
mystream.clos e();

or
while (std::getline( mystream, mystring) )
{
// process mystring
}
mystream.clos e();

After close() check the stream state. Otherwise you don't know "when a
file is finsihed".
Please explain this. After you call .close() don't we know that the file is
"finished"?
Nov 14 '06 #8
On Tue, 14 Nov 2006 04:35:11 -0800, "Jim Langston" wrote:
>"Roland Pibinger" wrote in message
>After close() check the stream state. Otherwise you don't know "when a
file is finsihed".

Please explain this. After you call .close() don't we know that the file is
"finished"?
But when .close() fails?
Nov 14 '06 #9
Roland Pibinger wrote:
On Tue, 14 Nov 2006 04:35:11 -0800, "Jim Langston" wrote:
>>"Roland Pibinger" wrote in message
>>After close() check the stream state. Otherwise you don't know "when a
file is finsihed".

Please explain this. After you call .close() don't we know that the file
is "finished"?

But when .close() fails?
Maybe, then you have an open but "finished" file. Could someone explain what
this "finished" term means. Is that an officially recognized state a file
can be in?
Best

Kai-Uwe Bux
Nov 14 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
6290
by: Boris Nikolaevich | last post by:
This is backwards of what I usually want--normally if you have a long-running ASP script, it's a good idea to check to see whether the client is still connected so you can cancel execution. However, I have a script that absolutely MUST finish one it's been started--is there a way to cause the entire script to execute, even if the client...
39
789
by: jabailo | last post by:
I am looping through a text file, and with each row, I launch a web service, asynchronously. Before I move on to the next step in the process, I want to make sure that all the web services have completed. How can I do this? If I were to just put a Thread.Sleep with some arbitrary number ( say 5 minutes ) would the asynch web services...
11
20329
by: Peter Kirk | last post by:
Hi there I am looking at using a thread-pool, for example one written by Jon Skeet (http://www.yoda.arachsys.com/csharp/miscutil/). Can anyone tell me if this pool provides the possibility to wait for all its threads to finish? For example, if I start 20 threads: CustomThreadPool pool = new CustomThreadPool("PetersThreadPool");...
6
3006
by: theGreatGnu | last post by:
Hi all, I am new to PHP, Apache and Mysql. But I least I have managed to install everything on my home computer on my own and everything is up and running. I can fetch data from the database and display it. So far, so good. However, I'm stuck on an irritating problem. Whenever I connect to mysql, my PHP pages don't want to finish...
4
8404
by: Dylan Parry | last post by:
Hi folks, I'm writing a program that needs to execute an external program and wait for it to finish running before it can make use of the output from that program. Specifically, the external program converts from one file format to another, and is something that I can't do natively :( So what I need to figure out is how to: a) Start...
0
3805
by: mamod20 | last post by:
Please advise, I have the following example and want to know the best way to use $dbh->disconnect; and $sth->finish; -------------- $sql_host="localhost"; $sql_dataname = "database"; $sql_userid = "root"; $sql_password = "password"; &connect_sql;
1
2396
by: Craig Coope | last post by:
I may be barking up the wrong tree here (maybe I can do all this in Excel) but... I have created an Excel sheet that lets me input job start and finish times and the amount of work done within the jobs so that I can work out "total work per hour" etc....it works very well but I have to input the times and workload manually... Now is...
5
6146
by: Jim | last post by:
I have a form in an Access 2003 db that calls (using shell - thanks to this newsgroup) a Vb.net program I wrote to parse a text file. The call works fine. The VB parses the file correctly. How do I get the Access form to wait for the VB program to finish? Can the vb pass code back to Access? Can Access check somehow to see if VB is...
3
1251
by: Andy B | last post by:
I have the property below. What I need to do is access the asp.net Menu controls MenuItems in a content page that are on a master page. I need to set the Enabled state to false when the page loads and re enable it when the page goes to the next one. Any ideas how to finish this one? Or if I got it wrong? //return the main menu so other...
0
7612
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7672
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6283
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5512
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
937
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.