Author Topic: How to jump to a C++ function's declaration (prototype)?  (Read 5990 times)

KenM

  • Community Member
  • Posts: 8
  • Hero Points: 0
How to jump to a C++ function's declaration (prototype)?
« on: January 03, 2007, 06:26:42 PM »
My cursor is in a C++ function definition in a .cpp file and wish to jump to the declaration (prototype) of that function.  Also, when on the declaration, jump to the definition.

Something like push_tag() that doesn't show the dialog to choose between the .cpp (definition) and .h (declaration) files.

Any ideas?

Thanks,
Ken

Phil Barila

  • Senior Community Member
  • Posts: 745
  • Hero Points: 61
Re: How to jump to a C++ function's declaration (prototype)?
« Reply #1 on: January 03, 2007, 06:47:44 PM »

Goto:  Tools->Options->File Extension Setup. 
Select the Tagging tab.
Select Goto Definition Navigates to symbol definition (proc)
When this is selected, the first ^. (Control+Dot) will take you to the function, another ^. will result in jumping to the prototype.  In fact, you can just jump back and forth between the two by continuing to issue ^.s.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: How to jump to a C++ function's declaration (prototype)?
« Reply #2 on: January 03, 2007, 06:50:44 PM »
... if you're using SE v11 ...

HS2

Phil Barila

  • Senior Community Member
  • Posts: 745
  • Hero Points: 61
Re: How to jump to a C++ function's declaration (prototype)?
« Reply #3 on: January 03, 2007, 08:48:50 PM »
My bad.  As usual, HS2, you are right.  This only applies to v11 (and presumably, later).