io
How do I check for NSFileHandle has data available?
I\'m working with NSTask, configured with 3 NSPipe, and want to read from standardOutput and standardError. I do it inside while - 1st for stdout, next for stderr.[详细]
2023-04-06 07:40 分类:问答Reading a binary file into a string
It must be obvious, but I can\'t figure it out. I spent almost a whole day for this. I\'ll gladly buy a beer to someone who can lighten me.[详细]
2023-04-06 03:30 分类:问答Why use unsigned chars for writing to binary files? And why shouldn't stream operators be used to write to binary files?
My first question is, why is it customary to use unsigned chars for writing to files in binary mode? In all of the examples I have seen, any other numerical value is casted to unsigned char before wri[详细]
2023-04-05 10:44 分类:问答c++ overwrite already opened file
I am opening a file with ifstream开发者_JAVA百科 to check if it exists. Then I close it and open it with ofstream to write to it, and I think setting ios::trunc flag allows me to overwrite it.[详细]
2023-04-05 09:03 分类:问答How to avoid caching effects in read benchmarks
I have a read benchmark and between consecutive runs, I have to make sure that the data does not reside in memory to avoid effects seen due to caching. So far what I used to do is: run a program that[详细]
2023-04-05 09:03 分类:问答equivalent of fgets on a buffer?
I was originally parsing a file line by line using fgets(). Now I changed things so that I 开发者_C百科already have my entire file in a buffer. I still like to read that buffer line by line for pars[详细]
2023-04-05 08:17 分类:问答How to make CreateFile as fast as possible
I need to read the contents of several thousands of small files at startup. On linux, just using fopen and reading is very fast. On Windows, this happens very slowly.[详细]
2023-04-05 06:09 分类:问答Is FileInputStream using buffers already?
When I am using FileInputStream to read an object (say a few bytes开发者_运维问答), does the underlying operation involve:[详细]
2023-04-05 02:23 分类:问答Sharing a FILE pointer between libraries
I got a simple quesiton; I am using a FILE* fp in one of my libraries to fopen/fwrite开发者_JS百科 to the file, and I want to do fclose() on fp in another library - what is the best way for the other[详细]
2023-04-04 23:55 分类:问答Need theory help with reading file and stuff
i would like to request some help on theory part, so grind those gears, here it comes I want to load a file into my program, which looks something like this:[详细]
2023-04-04 23:33 分类:问答