如果有的话,我也想编译一下

解决方案 »

  1.   

    word有这功能, WPS也有。
    在unix下可以用WC
      

  2.   

    超过10万行的程序,我就写了好几个
    我硬盘上的程序超过1G了。有个vc Add in可以统计一个project 的行数,还有很多其它功能。www.codeguru.com
    或www.codeproject.com上有
      

  3.   

    写是会写,但我不会遍历目录下所有CPP和H文件,只会写单个的
      

  4.   

    FindFirstFile
    FindNextFile
    FindClose - 别忘了这个
    + 递归,就很容易遍历整个目录了,对于组织良好的程序,这样统计是可以,但要注意,一个工程的原文件不一定是放在一起的,具体要看你的源文件组织方式了,我说的那个add -in 是从project文件计算的,所以从理论上比遍历目录的方法要准确。
      

  5.   

    我想问一个相关问题:
    一个人代码的行数[VC]中,算不算MFC自动生成的呢。
      

  6.   

    有个还可以,
    http://cccc.sourceforge.net/CCCC - C and C++ Code Counter
    A free software tool for measurement of source code related metrics by Tim Littlefair
    The CCCC tool was developed as a testing ground for a number of ideas related to software metrics in an MSc project.  The research project is described at http://www.fste.ac.cowan.edu.au/~tlittlef  
    My research project is now (hopefully) coming to an end. The descriptive page will remain on the net, and some material (e.g. the finished thesis) may be added to it, but when my registration as a student expires, soon afterward I would expect to lose the ability to change material on this site, hence the effort to get this one up and running as a forum to cover the onward development of the CCCC tool (for as long as there is any). Many thanks to SourceForge for providing this forum to me at no cost for this purpose. Check out http://sourceforge.net if you are interested in their policy of providing free web hosting for open source projects. In addition to hosting the page you are reading at present, SourceForge support a range of services for their projects. http://sourceforge.net/projects/cccc is their standard summary page related to the CCCC project, which provides access to all of these services. In the future I hope to use SourceForge to host anonymous CVS access. For the present, I have set up mailing lists and bug tracking and http download access to the most recent beta release cccc-3pre48.tar.gz. I have set up a number of mailing lists related to CCCC on the SourceForge site: there is one for announcements , one for discussions about the use of present versions of CCCC , and another for discussions relating to the future development process (including proposals for new features or changes to old ones). The interface to search or add to the bug tracking database for CCCC is available via https://sourceforge.net/bugs/?group_id=7763 . The last version of CCCC which I released was 2.1.4, which I put out some time in September 1997. Between then and December 1998, I tried to concentrate on writing up the project thesis. Since December 1998 I have been working on a new release of CCCC, which I plan to designate 3.0. The new version fixes a number of bugs reported in 2.1.4, but also has a lot of new code, and will presumably introduce many new bugs. I believe that the beta version 3.pre48 is superior in stability, accuracy and usability to version 2.1.4. It is similar in spirit, although I have introduced an add-in to provide integration with the Microsoft Visual Studio IDE. The main features of CCCC 3.0 which are working as of today include: internal database recoded using STL (much faster! no hard-coded limits on run size!) 
    persistent file format allows analysis outcomes to be saved across runs, reloaded, read by other tools 
    all output files are now generated into a single directory, (by default .cccc under the current working directory) 
    each class identified has a detailed report (as in 2.1.4), in this report, low-level data are accompanied by HTML links to the location in the source file which gave rise to the data (as in 2.1.4), however these links now work (they didn't in 2.1.4), and they take you directly to the relevant line in an HTML-ized clone of the analyzed source code (in 2.1.2, before I broke the links, they took you to the primary source file - due to the fact that the files don't have HTML tags embedded, the link could only take you to the top of the file) 
    configuration directory no longer required (some configuration items can be loaded from a file specified on the command line) 
    The things I need to do to go from pre-release to release include (suggestions are welcome): 
    tweak the command line interface 
    decent packaging (RPMs for Linux, SFX for Win32?) 
    testing 
    documentation 
    It shouldn't take me too long, except for the fact that I have a day job and a family.  Anyone who is interested in helping, or who wishes to send in comments is welcome to email me. 
    Finally, I would just like to ask anyone who finds CCCC useful to consider volunteering to assist in the experiment which forms the main outstanding component of my PhD study. this link describes the experiment and links to the online form to volunteer to participate. Hosted by
      

  7.   

    你看的是高质量程序设计指南C++/C语言吧用Perl看一个就可以了看看有多少个";","#","()",":"就可以了