Finding a function definition using a call in C ++

I am trying to understand the source code of a fairly large C ++ project. The source was not written using the IDE, so I don’t have a go button to go to the function definition.

For instance:

srand();

I want to know exactly where the srand () function is defined.

The only method I can come up with is manually checking all the inclusions of the header to recursively find the declaration and the corresponding file to determine.

This is a linux environment, and the source is compiled with g ++ (using cmake).

+3
source share
2 answers

Watch the program ctags.

ctags , . , . ( ctags Vim Emacs, , , .)

+4

VI, shift+k , . , man (3), 100%. , , .

- Doxygen ( ). , .

+2

Source: https://habr.com/ru/post/1786318/


All Articles