Line Counting, Version 1.1 | CodeGuru

Line Counting, Version 1.1

Click here for a larger image. Environment: VC5, VC6 Introduction When working, we often need to count how many lines our programmers have developed, including source code lines, comment lines, and blank lines. This software, Counting ver1.1, is designed for that purpose. At first, I developed it to count my VC++ source code. Later, it […]

Written By
CodeGuru Staff
CodeGuru Staff
Feb 4, 2004
2 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More



Click here for a larger image.

Environment: VC5, VC6

Introduction

When working, we often need to count how many lines our programmers have developed, including source code lines, comment lines, and blank lines. This software, Counting ver1.1, is designed for that purpose. At first, I developed it to count my VC++ source code. Later, it was upgraded to count files such as VB, Java, ASP, JSP, and so on. By comparison, I found Counting is quicker and more accurate than other means, especially for some unfamiliar instances.

Advantages

  1. Accuracy. This function is absolutely necessary to any line-counting software. For that purpose, I created one test file (test.cpp), in which I designed some code lines that are reasonable but can easily be counted incorrectly. Counting (ver1.1) can count lines in test.cpp accurately.
  2. Speed. Due to proper process and good algorithms, Counting can count lines very quickly.
  3. Ease of use. Counting is easy to use and doesn’t need to be installed.

How to Use

  1. Input the file name or extension in the “file or extension” (such as .cpp;*.c;*.h or counting.cpp; setting.c; resource.h), separated by “: , :”. Click the combo box; you can select some extensions.
  2. Input the path in the “searching in” combo box.
  3. You can select whether to count in a subfolder.
  4. Click the “Count” button to begin counting; click it again to stop counting.
  5. You can click the “Save” button to save the counting result to a text file, Excel file, or CSV file.
  6. Double-click the control list to open the file.
  7. If both code and a comment lie on the same line, you can select a different method to count them in the Setting dialog box.
Advertisement

Author’s Statement

This software is an open source. You can use it freely but don’t remove any declaration about the author. Please let me know of any problems or improvements. Also, you can download the latest version on my personal home page. Thanks and good luck.

My e-mail address: xiaogi@sohu.com
Home page: http://xiaogi.nease.net

Downloads

Download demo – 173 Kb

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.