How to read a file?
- Updated Friday, June 3rd 2016 @ 08:43:56
Could someone give me some directions on where I can retrieve (and read from) a file? I've already tried ./src/ and could not find the file. I'm using a Java bot in case it matters.
Update: ./src/ did work, my bad.
- Created Tuesday, July 19th 2016 @ 15:18:16
It is my turn to fail to do a fopen on a text file included at the root of my .zip in my C++ bot. The exact command is fopen("./src/MyFile.txt","rt"). I have tried "./src/MyFile.txt", "src/MyFile.txt" and "MyFile.txt", everything has failed. The file weighs around 850 Kb and its real name is a bit long (57 characters), but it works in my windows environment, so i would be surprised if it did not in a unix one... Any idea welcome :-)
- Created Tuesday, July 19th 2016 @ 15:20:53
There has been a couple of posts about it, you'd be better of by including your text inside a class (yes it's boring ;-) )
- Created Tuesday, July 19th 2016 @ 15:24:07
Yes I was hoping to avoid that, as it seems to be working for some (Daporan among others).