error C2039: 'abort' : is not a member of 'std'
-
In VC6 when I use
std::abort();
I am geting an error "error C2039: 'abort' : is not a member of 'std'". But it compiles well in VS2010. I am seeing the definition of abort in both version of stdlib.h. What is the problem?
-
The problem is that
stdlib.h
does not define thestd
namespace, it is the standard C library header. You should includecstdlib
for use of thestd
namespace features.One of these days I'm going to think of a really clever signature.
-
In VC6 when I use
std::abort();
I am geting an error "error C2039: 'abort' : is not a member of 'std'". But it compiles well in VS2010. I am seeing the definition of abort in both version of stdlib.h. What is the problem?
Throw VC6 in the bin, it's long past its useby date.
Steve
-
Throw VC6 in the bin, it's long past its useby date.
Steve
-
Thanks. Yes, That's right! we are slowly moving to VS2010. But at this point of time we are in a situation to use
std::abort();
in both VC6 and VS2010. This compiles well in VS2010 but my concern is why its not in VC6. Any idea would be helpful.
-
Why not just use
abort()
? Adding the namespace prefix buys you nothing.One of these days I'm going to think of a really clever signature.
-
Ok. Sorry for not explaining that the code piece 'std::abort()' is part of third party and we cannot modify it.
Then contact the third party and tell them to fix it. I assume that you have paid for this code in which case it is their responsibility to provide a fully working solution. With the amount of information you have provided about this code it is difficult to make any better suggestions.
One of these days I'm going to think of a really clever signature.
-
Then contact the third party and tell them to fix it. I assume that you have paid for this code in which case it is their responsibility to provide a fully working solution. With the amount of information you have provided about this code it is difficult to make any better suggestions.
One of these days I'm going to think of a really clever signature.