Link to home
Start Free TrialLog in
Avatar of andrewjb
andrewjbFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Switch between .cpp and .h in Studio..

Having just decided to move from Borland Builder to VStudio.net, I can see I'm going to have lots of niggling questions here...

Is there a quick (hotkey) way to jump from the .cpp file to it's corresponding header file and vice-versa?
Avatar of Jaime Olivares
Jaime Olivares
Flag of Peru image

There is a pane at the right of Visual Studio IDE, where you can see classes. If you click the main class label, the .h file will be opened, if you press in a method, the .cpp will be opened unless the method is an inline function.
Also, when you are in the .cpp file, you can press right button over the #include "yourheader.h" sentence (over the filename itself). A pop up menu will appear, choose: Open Document "yourheader.h"
Avatar of andrewjb

ASKER

Yup - found those. But I hoped that there'd be a like-Builder option. Pressing Ctl-F6 switched between the .cpp and .h automatically. Is there no equivalent (or way to set one up?)

Ugh.

No, there is no equivalent but I am sure you will discover many features in Visual C++ that Borland's doesn't have...
Aha!

You can do it with a macro, though.

e.g.

http://www.codeproject.com/macro/h_cpp_switcher.asp
The question:
Is there a quick (hotkey) way to jump from the .cpp file to it's corresponding header file and vice-versa?
The answer:
No

So, i don't see a reason to close/refund, when author doesn't get the answer he/she likes.
I'm not going to argue for 50 points - let the mod decide.

However, there is a much better anwer than 'No', as I later discovered and have herein posted..

ASKER CERTIFIED SOLUTION
Avatar of Lunchy
Lunchy
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial