Searching for C/C++ elements
It is recommended that you perform searches on successfully compiled programs to ensure the accuracy of search results. It is important to familiarize yourself with the correct search syntax to use to complete an effective search. It is also important to ensure that include paths and symbols are correctly defined. For more information, see Setting up include paths and macros for C/C++ indexer.
See C/C++ search, for more information on:
- What you can search for
- How to limit your search
- How to use wildcard characters in your search
- Syntax examples
Performing a C/C++ Search can be done in a number of different ways but regardless of the manner chosen the same information must be provided to C/C++ Search.
The info required to do a search is:Option | Explanation | ||||||||
---|---|---|---|---|---|---|---|---|---|
Search string | this is the name of the element you are looking for. See C/C++ search for more information on how to specify wildcard searches and how to further refine your searches by using fully qualified names | ||||||||
Search For | this is the element type that you wish to search for. You can also select to search on 'Any Element' which will perform the search on a combination of all elements | ||||||||
Limit To | this allows you to limit your search to declarations, definitions or references. You can also select 'All Occurrences' which will search for declarations, definitions and references that match the element | ||||||||
Scope | this allows the user to limit the scope of the search. The three available scopes are:
|
There are 3 main ways for initiating a C/C++ search:
- Using the C/C++ Search dialog
- Selecting an element in the Editor view
- Selecting an element in the C/C++ Projects view or Selecting an element from the Outline view
Using the C/C++ Search dialog
- Enter the search string in the Search String field (optional mark it case sensitive).
Note: that previous search queries (from the same work session) are remembered and can be accessed via the drop down list. - Select the Search For element.
- Select the Limit To.
- Select the Scope.
- Press Search.
Results are displayed in the Search view.
Selecting an element in the Editor view
- Select the desired element in the editor.
- Right click and select All Declarations or All References and the scope you wish to search.
Results are displayed in the Search view.
Selecting an element in C/C++ Projects or Outline View
- Select the desired element in the tree.
- Right click and select All Declarations or All References and the scope you wish to search.
Results are displayed in the Search view.
For more information, see:
- Workbench User Guide > Concepts > Views > Search view
- Workbench User Guide > Concepts > Workbench > Working Set
- Workbench User Guide > Tasks > Navigating and finding resources
C/C++ search
C/C++ Indexer
CDT Projects
Open Declaration
Selection Searching for C/C++ elements
Navigate to C/C++ declarations
C/C++ search page, Search dialog box