Problem with writing in a text file in C
Hey there
It will be great if someone could help me with the following case I recently found a C program on the net and i compiled and everything was fine The program starts by passing parameters in the terminal a text file to read and another to write. Well, reading goes well. The problem is there is nothing in the output text file. I checked my permissions which were good as well. Any ideas? |
Might help to see the relevant piece of code? :}
Cheers, Tink |
Well, to be honest with you i thought about it before.
The fact is that the code is too long and is regarded to Counter Propagation Neural Networks in Artificial Intelligence so that's why i didnt post it. http://www.cis.syr.edu/~mohan/html/Bookfiles/counter.c There is also a README txt in http://www.cis.syr.edu/~mohan/html/B...ME-for-counter which i strongly believe that it would be useful. |
You need to pass three files in total. Sounds like you only pass two.
|
The fact is that in output generation (-o) i pass 3 files as i am told
I noticed also that if i pass an output file which doesnt exist after the compilation will be produced, but will not be opened by a default program lets say by KWrite. If i try then to open it with KWrite will be empty. |
It works (at least my outputfile is not empty). I started with an empty data file before I could generate the weight file. Next it went smoothly.
Code:
wim@btd-techweb01:~/progs/lq507750$ ./lq507750 -o weight1 data1 out1 PS gcc 3.3.4 on slackware 10.1 |
All times are GMT -5. The time now is 03:44 AM. |