Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

a bug about files

Status
Not open for further replies.

dejawux

Programmer
Aug 22, 2005
3
TR
hi everyone...
i am programming a game "find the true number"
there is user filing and high scores filing functions in it. when i run them alone (in main) they are running true.(they read true and write perfectly) but when i put them on the main program as a function they starting read false and (sumtimes write false) what is that reason?? i extremely fast need help!! waitng 4 answers!!
 
>>> i extremely fast need help

You may get help quicker if you actually post some code ...

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Perhaps it's this code in the Borland forum
Although it doesn't contain any functions either.

You're going to have to post your attempt which shows how you wrote a function.

My guess is you declared a local array whose contents are lost when you return back to main()


--
 
So friends it is my fault sorry... in functions if i open file as "wb" and i read it "r" it cause a failure.At least i hope so. Cuz it runs ok now. i thank every one here...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top