String functions like strcpy,strcat,itoa...shows warning as "declared deprecated" in Visual Studio 8.0 instead it suggests to use functions which are enhanced secure versions of the same such as strcpy_s,strcat_s,_itoa_s.....using this in my file removes those warnings but i am using this same file in visual studio 6.0 here it gives compile time error as "undeclared identifier" which is correct as this old version of visual studio is not provided with the new added versions of above functions....so what is the solution for this as i want to use this same file in my VC6 as well as VC8 projects....plz help
risa 0 Light Poster
Recommended Answers
Jump to Post#define strcpy_s strcpy
:D
Jump to PostI agree, using strings would probably solve your problem. But since that wasn't your question, you could try:
#define _CRT_SECURE_NO_DEPRECATE #define _CRT_NONSTDC_NO_DEPRECATE #include <......> etc
which would take care of the "declared deprecated" warnings.
Or you could add
#pragma warning (disable:4996)
to your code…
All 5 Replies
ivailosp 11 Junior Poster
risa 0 Light Poster
ivailosp 11 Junior Poster
Nick Evan 4,005 Industrious Poster Team Colleague Featured Poster
risa 0 Light Poster
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.