Click here to Skip to main content
Click here to Skip to main content
Go to top

Counting Lines in a MS VC++ 6.0 project

, 4 Aug 2001
Rate this:
Please Sign up or sign in to vote.
A program that counts the lines (source, comments, blank) in every file included in a MS VC++ 6.0 project
<!-- Download Links --> <!-- Article image -->

Sample Image - LineCounter.gif

<!-- Main HTML starts here -->

Introduction

Ever wondered how many lines a project you have worked on for a month (or maybe for a year!)? Well, we did this for you Smile | :)

This program (LineCounter) was developed with one purpose only: to count your lines!

The program is able to count source code, comments (both styles: "// comment" and "/* comment */"), and blank lines. It shows the results in a couple of editboxes, and has a preview window (right click on the list).

The program opens the project file (.dsp) and throws it through the parsing code. After parsing is done the list of project files is steped-by-step and lines are counted.

That's it! The source code is pretty self explanatory, so I guess you'll manage.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

_declspec

United States United States
No Biography provided

Comments and Discussions

 
GeneralMy vote of 3 Pinmemberjyl_hrb17-Apr-11 21:41 
Questionhow to use the code counter in perl? Pinmembermoaweah naser17-Jul-07 20:27 
AnswerRe: how to use the code counter in perl? PinmemberAS-codeproject14-Aug-07 12:09 
GeneralSome Modifications I would suggest PinmemberRay Steel13-Oct-04 13:44 
Generalthis is definitely a useful tool, and... PinmemberZhefu Zhang2-Dec-03 8:10 
GeneralRe: this is definitely a useful tool, and... PinsussAnonymous16-Sep-04 22:05 
Actually Visual Studio 6 does at least provide a way for you to print all open documents. It is one of the sample Macros. I am sure that with a little tweaking you can edit the macro such that it does not require the documents to be open in order to print (i.e. it will open them to print, then close them.

Generalyour program is not counting lines correctly Pinmemberevilman1-Feb-03 9:33 
Questionwhy? PinmemberIvan Tsygoulyov24-Dec-02 23:24 
GeneralMmmmh... PinmemberRage26-Nov-02 4:45 
Questiondoes anyone really need this? Pinmemberkokie19-May-02 9:03