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
> >Is it possible to write a macro that compiles a file set (cpp/h).
>>I can find it on the menu if I right click on a cpp file but it would be
[quoted text clipped - 5 lines]
>
> Dave
>Isn't there a way to compile if I am in the editor for eigther the .h or
>.cpp file?
It should work if you're currently editing the cpp file - it always
has for me.
Dave
> Thanks Dave, I did not see that one.
>
[quoted text clipped - 3 lines]
> 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.

Signature
David Wilkinson
Visual C++ MVP
Torben Laursen - 07 Jan 2008 14:32 GMT
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
>> Thanks Dave, I did not see that one.
>>
[quoted text clipped - 15 lines]
> project button). The button is dimmed if the current file is not an
> implementation file.