C++ How to go to function body from calling line in Visual Studio?

大城市里の小女人 提交于 2021-01-28 19:39:17

问题


When I press F12 then I get h-file with function prototype. But I want get function body. I didn't find any context menu item which does it. So I am forced to find function body manually that sometimes is hard.


回答1:


F12 goes to the function body if InteliSense knows where it is.

The source code of the function body must be part of the VS solution.

Note that Intelisense is known to have bugs so it's not working as expected 100% of the time.




回答2:


If you are using Visual Studio 2010 or later then you can also use the great Navigate To command (on the Edit menu or Ctrl+,) which will show you the declaration and definition.




回答3:


By default

Right Click -> Go to Definition

or

F12

works.

But If its not working fine, may be there is some redundancy/ name conflicts. You need find that out.



来源:https://stackoverflow.com/questions/22015905/c-how-to-go-to-function-body-from-calling-line-in-visual-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!