0

I have a GEDCOM file, which I am supplying to my program, my program checks the content of GEDCOM file against a set of functions.

If the contents of file, fail to match the requirements of function, it should throw an error along with the line number on the GEDCOM file where error exists.

I would also like to mention that I have tried using macros like LINE, FILE but they are printing the contents of source code like line of source code and file name of source code.

Thanks in advance

Harshit Singh
  • 11
  • 1
  • 1
  • 3

1 Answers1

0

If you are reading the file one line at a time you can keep a counter of the number of lines you have read from the file.

If you already have the whole file in one big buffer you can scan the number of newline or return characters.

If you provide a MCV example demonstrating your code reading in the file I can maybe help more.

Community
  • 1
  • 1
Iverelo
  • 146
  • 1
  • 8