>_CRT_INSECURE_DEPRECATE
This has nothing to do with the ISO C++ standard. It's a Microsoftism for "We know better than you and will give a warning to protect you from yourself. Standards? We don't need no stinking standards!".
>_CRT_INSECURE_DEPRECATE
This has nothing to do with the ISO C++ standard. It's a Microsoftism for "We know better than you and will give a warning to protect you from yourself. Standards? We don't need no stinking standards!".
My best code is written with the delete key.
Ah right
So it looks like MS is just pestering the standards committee to make the changes, and is trying to force the change by declaring the functions 'deprecated' in their new and wildly popular MSVC 2005 (and freely distributed too, have I mentioned?). Therefore, by popular usage and annoyware they are attempting to influence the bulk of the programming community to either abandon the standard or bring enough pressure on the standards committee to force them to comply. Those bastards!Reply to: Martyn Lovell
Microsoft Corp.
1 Microsoft Way
Redmond WA USA 98052-6399
Email: [email protected]
**EDIT**
*Warning: This is a nonstandard program. If it breaks for you, get over it.*
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
>Those bastards!
AKA Stupid. There's far too much existing code that uses the "deprecated" functions, and it wouldn't help compatibility with C either. Both of those are big selling points of C++.
>**EDIT**
I added the disclaimer after some goofball tried to drop my rep when it seg faulted on them.
My best code is written with the delete key.
Well, strtok IS a bug source. Still, it's stupid of Microsoft to make it deprecated. I would understand, though, if they introduced a similar thing to deprecation into their compiler, but called it insecure.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
>Well, strtok IS a bug source.
Ignorance is a bug source. strtok is one of the functions that are troublesome because the user programmer didn't bother to figure out all of the issues involved in using it. The same can be said of scanf. There's nothing wrong with the functions, just how they're used. If you use them intelligently then there's usually no problem.
My best code is written with the delete key.
You're absolutely right, of course. Still, it's easier to be ignorant of the hazards of strtok than other functions. strtok preserves state, and this is something that mathematically inclined programmers really don't like. To them, a function that is given a specific input returns a specific output, no matter what happened before or after.
Of course, we could tell these people to use Haskell and go away Even user input functions are wrenched into a functional pattern there.
All the buzzt!
CornedBee
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law
>Of course, we could tell these people to use Haskell and go away
Works for me. Tools should be used when they're the best option. Purists are uncomfortable with C++ because it embraces that concept.
My best code is written with the delete key.
>> This has nothing to do with the ISO C++ standard. It's a Microsoftism...
sort of like how you have to use WinMain() instead of main(). very annoying.
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
Ok, thanks everyone. So, do you figure it's safe for me to go through the CRT code and kill all the annoying and unholy _CRT_INSECURE_DEPRECATED's (and potentially the function_s() prototypes too)?
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
>do you figure it's safe for me to go through the CRT code and kill all the annoying and unholy
Annoying and unholy they may be, but implementation code is sacred. Only edit it if you really really REALLY know what you're doing and are still willing to face the consequences when it turns out that you don't. Safe or not, I wouldn't recommend it. You would be better off using a pragma to disable the warning.
My best code is written with the delete key.
that's a main adapted to receive the process' handler and Graphical window flags, since Windows programming has little or nothing has to do with ansi or posix.. but why I'm I saying this? you already knowOriginally Posted by Sebastiani
Hunter... try #pragma warning(disable:***).
or more problematic
#undef _CRT_INSECURE_DEPRECATED
#define _CRT_INSECURE_DEPRECATED
The problem with the pragma is, every other deprecation warning will go with it. The problem with the #undef is that it's not defined until I include the header, at which point it's too late to undef or define anything. So the solution is,try #pragma warning(disable:***).
or more problematic
#undef _CRT_INSECURE_DEPRECATED
#define _CRT_INSECURE_DEPRECATED
#define _CRT_INSECURE_DEPRECATE before I include any standard headers
Too bad the implementation is sacred.. sure woulda been nice to not need that extra line
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
>The problem with the pragma is, every other deprecation warning will go with it.
Boo hoo. Buy the standard and then you'll know exactly what's deprecated and what isn't. No need for those silly warnings.
>sure woulda been nice to not need that extra line
You could always just ignore the warning, or write a script to take the output and systematically remove the warnings you know are silly, or hire someone to scan your warnings for you and tell you about the ones that are pertinent, or call Billy on the Batphone and order him to take a reality pill, or build a space-time transmogrifier using the gutted carcass of your old VCR, 6 ballpoint pens, and a stick of low-fat margarine so that you can reshape reality as you see fit. Or you could just get over it and start worrying about things that actually matter.
My best code is written with the delete key.
I've just been victimizedYou could always just ignore the warning, or write a script to take the output and systematically remove the warnings you know are silly, or hire someone to scan your warnings for you and tell you about the ones that are pertinent, or call Billy on the Batphone and order him to take a reality pill, or build a space-time transmogrifier using the gutted carcass of your old VCR, 6 ballpoint pens, and a stick of low-fat margarine so that you can reshape reality as you see fit. Or you could just get over it and start worrying about things that actually matter.
Alright, I guess I'll just ignore the warning for now (that #define seems to be encroaching on implementation-messing territory), since I don't have a copy of the standard and I'm not confident that I know exactly what's deprecated and what's not. Then, if I want to know if the warning is a 'false positive', then I can just look at the CRT source and see if it's another one 'o those dratted _CRT_INSECURE_DEPRECATE's
Thanks everyone!
P.S. Prelude, I'll let you know when I have that space-time transmogrifier built
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
To get a clean compile I'll usually lookup the error code and write a define such as #pragma warning (disable : errorcode)