![]() |
|
#1
|
|||
|
|||
about file handlingi have two programmes . In one programe i m generatin some numbers and sending to a file named "output1" ,and by another programe i want to use the numbers . so i m using fstream..I want to run both the programmes simontaneosly means while the 1st one is generating numbers and sending to file ... i want that 2nd programme use them and wait for the another number which is going to be add in the file output1..... BUT here a problem the 2nd programme is not taking the all values from the file...it takes just the values which is there in the file when the 2nd programme started running ......... means it is not taking the upcoming values which are coming in the programme continuously ......so please sugeest me what to do ...........
my first programme is which is generating numbers in a file named output1 CPP / C++ / C Code:
and the 2nd programme is which is suppose to be take all the upcoming values in output1 CPP / C++ / C Code:
thanks in advance Last edited by LuciWiz : 01-Aug-2006 at 18:59.
Reason: Please insert your C/C++ code between [cpp] & [/cpp] tags
|
|
#2
|
||||
|
||||
Re: about file handlingFirst off, I assume you've read the Guidelines as requested previously. You might want to review them before posting to get the code tags right. Then it will be helpful down the road if you'd format your code better. Here are some ideas.
What you are attempting to do is extrememly difficult at best. And the way you are doing it won't work. The operating system is not going to process the files the way you want. Is there a reason at this point in your learning you need two programs to communicate with each other? Or are you simply trying out something new? If you're just trying something out, I'd recommend shelving this idea until later when you have a better grasp of C++, files, and the operating system. If it's something you need, work up a 'design' that explains how the two programs need to interact and we can work out a procedure that may work for your project. I'm assuming here the code you posted would be an attempt to just figure out how the communication would work to be added to a larger project. __________________
Age is unimportant -- except in cheese |
Recent GIDBlog
Halfway done! 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 07:44 |
| Download files in c for windows operating system | oozsakarya | C Programming Language | 5 | 20-Jun-2006 03:33 |
| File handling in C | trinath | C Programming Language | 2 | 09-Jan-2006 12:25 |
| CD burner wont burn!! | robertli55 | Computer Hardware Forum | 1 | 18-Jun-2004 10:53 |
| Yet another CD burner problem: Lite-On LSC-24082K | Erwin | Computer Hardware Forum | 1 | 22-May-2004 11:28 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The