Hello, RussianFellow, you wrote: RF> Functions fscanf, fgets, fprintf for this purpose approach or it is better to use any other methods? Whether there are in library MFC such methods? Type function fscanf and fgets generally has not enough for what approach, except hand-made articles. What will your program if in the text file "casually" there was a line long 4 kilobytes do? What size there should be a buffer for fgets' to consider, what any not "the beaten" file will be read correctly? What as much as possible admissible it is long lines in a correct "text" file and how the program if this limit is exceeded should behave? Type functions fread in a combination to manual sharing for the lines can work very much even not bad, but it depends on implementation. In one implementations they automatically use memory mapped files, in others essential acceleration can achieve, delivering the big buffer (see setvbuf) or simply reading in the big buffer. fprintf is a function an output and if it is necessary to you, without it it is difficult to manage. But if to you it is not necessary an output, it is better to use fwrite, fputs at the worst. With big enough buffer it can work not bad. RF> (it is a question of a case when it is necessary to count from a file of 50 thousand lines or to write down in a file of 50 thousand lines). For what time he should be read? It is not eliminated that on the modern iron it is read quickly enough even if all to do as much as possible in a simple way.