Search code examples
cterminalmanpage

Is there a way to quickly "man" pre-defined struct in c in terminal?


I am not an expert in c programming. What I did now is google every struct or function that I am not familiar with and see their usage. However "man" in terminal is a lot more handy and way faster. But I can only "man" to check for functions, is there a way to also refer to information on those structures defined in different libraries by typing some command in terminal. I would very much appreciate it.


Solution

  • You can use ctags to index structs, variables, or C++ classes, methods, etc from all of your header files in /usr/include or other directories. The result is a text file that can then be used by vim to jump to the definition of the struct. Some other editors also support this index (or tag) file.