seekp & seekg dose not work

I try to write a program

Multy layer perceptron back propagation neural network


It must read 2 text files.
one of them is input data. another is target data
each line is instance. every feature seperated by ","
Then it must calculate weightes and save them on an other text file.

when it open text file then going to last line,
seekp and seekg dose not work.

I use dev-cpp version

There is not any error or warning. It is compiled.
The exe file can run, but this function dose not work.

you can see my program through below zip file.

why it dose not work? has any mistake?

please help me.
The problem of the stream regarding seek is the text mode:

windows uses 2 character as a line end: "\r\n". In the stream text mode it is read as one: "\n"

seek reflects the real position in the stream, hence the number of characters read and the value of seek diverge
Topic archived. No new replies allowed.