If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Threaded View

.h file extensions and compiler tool

I am new at this. I am trying to set up a header file in the C++ compiler
-- very unsuccessfully so
far. My code builds just fine, no errors or warnings. However, when I try
to compile it, I get the
message that there is "no compile tool associated with the .h file extension.
I have trashed
my code and project file and started new several times. I have uninstalled
the Visual C++ compiler
and then did a complete reinstall. Nothing helps. Here is the code that
I am trying to compile:

PLEASE DON'T suggest that I ad the #ifndef, #define, #endif to the code it
does not work, I have
already tried it. And again, it builds error and warning free, but it will
not compile and I get the same
message.

I had someone else write this code on his computer and he did not have any
trouble compiling it. I
took what he wrote and tried to compile it on my computer and it would not
compile!

What am I doing wrong???? After less than a week into this stuff and I am
ready to give up!

Here are the steps that I have gone through to set up the header file:

Using the Win32 Console Application, I set up a new (empty) project. Then
I select "New"
and "C++ header file", name it and tell it to add it to the project. Then
I enter the code which
builds without error. It will not compile!

IS THERE ANYONE OUT THERE WHO CAN HELP ME??? I REALLY WOULD APPRECIATE IT!!!