Ctrl+F7 works fine in a .cpp file, sorry my mistake.
I have a macro to switch between .cpp and .h.
What I was looking for was a general method to compile a file or file set
just like in C++ builder 6.0
When I worked in that compiler I jused it a lot to check my code for syntax
errors.
Torben
"David Wilkinson" <no******@effisols.comwrote in message
news:e9**************@TK2MSFTNGP03.phx.gbl...
Torben Laursen wrote:
>Thanks Dave, I did not see that one.
But it only works if I select the file in the solution explorer and only
if I select the .cpp file.
Isn't there a way to compile if I am in the editor for eigther the .h or
.cpp file?
Torben:
I'm not sure that this is a realistic goal. Not all code is organized into
.h/.cpp pairs.
There is an old add-in that switches between the .h and .cpp files (if
any), or it can be done with Visual Assist. That is what I do.
I also add the Compile command to my build toolbar (next to the build
project button). The button is dimmed if the current file is not an
implementation file.
--
David Wilkinson
Visual C++ MVP