Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 375
  • Last Modified:

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?
0
andrewjb
Asked:
andrewjb
  • 3
  • 3
1 Solution
 
Jaime OlivaresSoftware ArchitectCommented:
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"
0
 
andrewjbAuthor Commented:
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.

0
 
Jaime OlivaresSoftware ArchitectCommented:
No, there is no equivalent but I am sure you will discover many features in Visual C++ that Borland's doesn't have...
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
andrewjbAuthor Commented:
Aha!

You can do it with a macro, though.

e.g.

http://www.codeproject.com/macro/h_cpp_switcher.asp
0
 
Jaime OlivaresSoftware ArchitectCommented:
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.
0
 
andrewjbAuthor Commented:
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..

0
 
LunchyCommented:
Closed, 50 points refunded.
Lunchy
Friendly Neighbourhood Community Support Admin
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now