This is a project I wrote to count how many lines, blank lines, and total lines are in a source file and keep track and tally them up.
I demonstrate it by counting how many lines of code are in the project repositories I have created for my notes, and example programs related to learning to C++.
You can download this project's code for free.
View Source