Solved

Finding all global/static variables

Posted on 2003-11-30
2
235 Views
Last Modified: 2012-05-04
I am modifying a large (400,000 lines) C++ application developed in VC++ 6.0.  I need to remove all global variables and static variables so that the application can become thread-safe.

Does anyone know of a way to identify the globals and statics within my source code?  The first step in replacing these (or wrapping them with thread-safe mechanisms) is to know how many and where they are.

0
Comment
Question by:pdsdps
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 125 total points
ID: 9848360
You can see all global variables in the Class View, Globals folder.
To find all static variables just make a search for the static word.
0
 
LVL 1

Expert Comment

by:fyf7262284
ID: 9848723
yeah,you can you see global variables in class view,and then you use "find "method to find the keyword "static"! you can try!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

696 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