hello,
i wrote a header file
the file got deleted
while i was compiling it

that header file includes a class definition
and nothing else

what might be the problem?


tnvkrishna

The source file itself got deleted? I'm disinclined to believe it could be the compiler ... but what compiler are you using? You certain it's gone? And that it's just not where you thought it should be. Have you searched for it? (as in the OS searches, not you)

>what might be the problem?
My guess is PEBKAC.

If you managed to do
gcc -o header.h prog.cpp
then yes, you will lose the header file.

Which IDE are you using?
A recent incident

i use a g++ compiler

the file was there as it is ,
it was the whole of the text in the .h file that
has disappeared!

i have a class definition in the header file
and i have heard that codes with
class definitions can be sometimes dangerous
as sometimes they sometimes behave very differently
including crashing the system
is it true?


and i used the command "g++ header.h"
to compile the header
this .........i thing has a problem.............is it?

I have seen that behavior with VC++ 6.0 on XP os with Norton Antivirus running. Antivirus program prevented the IDE from saving the file successfully.

Aside from the fact that you're not supposed to compile a header file, trying to compile it using the line you posted would not result in it being deleted.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.