I am reading a file with fgetc, so every time it reads a character, the positio cursor changes.
Is it possible, after each reading, to find out the "coordinates" of the cursor on the file in terms of column and row numbers?
thank
You can use ftell
It does not give you a position in terms of row and column, but from the very beginning gives you the current position in the stream.
"", . , . , "", . , "row" "column":
ftell
- , , - , . , , , -, .
Source: https://habr.com/ru/post/1726579/More articles:How to convert nib / xib to C object code? - objective-cCan I add a click event to a text range? - androidpassing mysql_fetch_array to an array () - phphttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1726577/mysql-backup-can-i-copying-individual-myisam-table-files-to-another-server-with-different-mysql-version-and-different-os&usg=ALkJrhisJVQphFO4O3dnCgQauulmHtuvnQCould there be an associative array with several types of keys? - c ++https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1726580/php-htmlentities-to-decode-textarea&usg=ALkJrhih0c-PqHIkJMrtHTnnb_l3NxZe_Ahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1726581/copy-folder-and-its-files-to-another-location&usg=ALkJrhhgJ-oiRq8bQse4xticnUKktSPGaQWhere is the resumption of execution after an exception? - c ++Set WPF / XAML window client area size - formshttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1726584/rails-how-to-send-emails-to-a-recipient-containing-umlauts&usg=ALkJrhg-fWf2UFG0b1vdiTgXcYbs1Ka5QgAll Articles