473,383 Members | 1,788 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Listing all variables of a source code

I've been tasked with a project to take a large program coded in c++
and a generate a list of the names of every variable and where they are
declared. Are there programs out there that will do something like
that?

If this is a snippet of code:

void someFunction(){
int foo;
char bob;
...
}

The output I need would look like this:

someFunction
->foo (int)
->bob (char)

Thanks.

Jul 23 '05 #1
4 1254
> I've been tasked with a project to take a large program coded in c++
and a generate a list of the names of every variable and where they are
declared. Are there programs out there that will do something like
that?

If this is a snippet of code:

void someFunction(){
int foo;
char bob;
...
}

The output I need would look like this:

someFunction
->foo (int)
->bob (char)

Thanks.


Doxygen

Jul 23 '05 #2
cscope

Jul 23 '05 #3
ru******@gmail.com wrote:
I've been tasked with a project to take a large program coded in c++
and a generate a list of the names of every variable and where they are
declared. Are there programs out there that will do something like
that?

You probably want to google for "crossreferencing" or xref tools for
C++. There are code comment extraction programs like DOC++ or
Doyxgen that probably do this as a side effect as well.
Jul 23 '05 #4


da********@warpmail.net wrote:
cscope


I dont think cscope is going to satisfy him/her since he/she needs
names of all the variables declared in a function. However, if he/she
knew the names, then cscope could tell where all the variable has been
defined and/or used.

OR probably I am still using a real old version of cscope which does
not have this feature. ;)

Jul 23 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: httpmart | last post by:
On my website I routinely make use of anchors such as: <a name="shipping">SHIPPING</a> and a link to them such as: <a href="#shipping">Go to Shipping information</a> These work fine on IE.
19
by: SU News Server | last post by:
I've struggled with this for quite a while and I'm am just not sure what is going on. I have the following code import os def buildList( directory='/Users/mkonrad' ) dirs = listing =...
1
by: me | last post by:
Hello, I have serveral xml files that will have the same formatting, like this: <bio> <title>xxxxx</title> <info>yadayadayada</info> <source>Bill Gates</source>
7
by: Michael | last post by:
Hi newsgroup, as the subject indicates I am looking for an advice using global variables. I am not if this problem is more about style then C. If its wrong in thi group, sorry. So I have a...
1
by: Sam Marrocco | last post by:
Is there a listing of the variables that can be used in vb.net installer default directories? For example: // uses three of these variables. I'd like to have a listing of any others I might...
2
by: Tim_Mac | last post by:
this could be seen as petty... but i noticed if you browse a folder on a .net 2 virtual directory, you get the directory listing. but the font styles are set to 8 point verdana which is...
4
by: techusky | last post by:
I have a *very* simple script written that displays the directory listing of the current working directory, but I am having some difficulty when I try to change folders. Basically, I have my $dir...
19
by: LucasLondon | last post by:
Hi there, First of all apologies for the long post. Hope someone can offer some advice. I have about 200 columns of time series data that I need to perform a correlation analysis on in terms...
1
weaknessforcats
by: weaknessforcats | last post by:
C++: The Case Against Global Variables Summary This article explores the negative ramifications of using global variables. The use of global variables is such a problem that C++ architects have...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.