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?


9 Years
Discussion Span
Last Post by Salem

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)


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.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.