Anatolii Humennyi
Anatolii Humennyi

Reputation: 1856

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

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.

Upvotes: 1

Views: 825

Answers (3)

foobar
foobar

Reputation: 2941

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.

Upvotes: 0

the_mandrill
the_mandrill

Reputation: 30862

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.

Upvotes: 2

egur
egur

Reputation: 7970

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.

Upvotes: 2

Related Questions