Solved

Line Counters

Posted on 1998-06-29
2
212 Views
Last Modified: 2011-09-20
Does anyone know of a good line counter utility that counts lines of code?  The program needs to count lines of individual functions also.
0
Comment
Question by:kph1
2 Comments
 
LVL 2

Accepted Solution

by:
JYoungman earned 50 total points
ID: 1251491
Under Unix, I just use the command
      tr -dc '{;' | wc -c
This counts semicolons and opening braces as "lines of code"
only.   That's good for coping with varying amounts of comments.
If you don't use Unix, you can do the same in a very short C++ program of your own writing.

0
 
LVL 84

Expert Comment

by:ozo
ID: 1251492
Unless you have /* {; */ in comments...
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
port mapped I/o query 10 140
memory mapped I/O query 6 137
Test against App 49 129
gdb doesn't stop on breakpoint 2 12
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use for-loops in the C programming language.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now