As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Do you know any type of tool, possibly for Linux and open source, that can be used to extract statistics from C/C++ source code files.
Apart from the number of lines, I would be interested in:
number of comment lines
number of classes used
number of declarations
and so on.
I use CLOC (http://cloc.sourceforge.net/) for counting lines of code, blank lines and comments. However CLOC does not interpret the code and thus cannot count classes, declarations etc.
And one should probably mention that this kind of statistics is considered meaningless by most people...
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I've heard the term 'aspect oriented programming' tossed around for a long time... I'm still confused... However, it seems to me that the general definition of an aspect is that you can take an existing program, annotate it using an 'aspect' of some sort and have it produce an additional behavior or something completely different. It kinda smells like a macro to me. I'm wondering if there are any similarities/differences as well as any informative links on this matter.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Is there any way to get data removed metadata(for example, ID3) from mp3 file with Objective-C, C++, or C?
there are similar function in PHP.
Unfortunately not. Use a library (For ID3, there are library implementations listed on ID3.org).
If for some reason you cannot use a library, removing a single ID3 tag from a file is quite a trivial process (search for the characters 'ID3' and then look at the header to get the tag size in bytes (details of the header found here). The tag will be contiguous so you can just remove it using a file descriptor.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
How could I embed or associate an .exe into an ordinary file, like .jpeg or any video etc.
? I want to associate the opening of the ordinary file with the execution of an executable program.
What you're trying to do is intended not to be possible. If and when it does happen, it takes place by exploiting a flaw in the program reading the file. This might take place (this is more common when the program is written in C or C++) by storing out-of-range values in the headers and hoping the program does not validate them before using them as offsets in memory, or (this is more common in higher-level languages) by taking advantage of a logical error in some overgrown feature the format intentionally allows (like embedding javascript).
Beyond this, I think any further answer is off-topic on SO. This is not a site for getting help writing malware.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Hi I have a C++ project with several executable and lots of code.
Each executable is equivalent to a single brick in my algorithms chain but common parameters are needed by different executables. I would like to store these params but how to do this properly.
Thanks.
Some possibilities for you to consider:
Environment variables
An XML file
Using a database
It's hard to provide more specific guidance without knowing more.
Assuming MS Visual Studio : Select the projects which need the common parameters in the Solution explorer and choose properties (alt-enter) goto the run-parameters and give values and save.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I've read the source code of a few popular open source projects like apache, nginx...
All of them are written in C, is there one written in C++?
It should be run-able program, not framework...
KDE
and up, to 30 characters and beyond.
Mozilla Firefox is written (mainly) in C++.
You may want to check out this list : http://www2.research.att.com/~bs/applications.html