Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
HI,

Is there a standard/Portable equivalent functions for MSVC++ functions like : strncpy_s(), strcpy_s(), _stricmp(), strcat_s(), sprintf_s(), fopen_s() etc.


I am porting a VC6 application to VC8, and getting tones of warnings regarding non-secure functions. I want to replace the non-secure functions with secure ones. But, till now i have not been able to find a portable solutions. I want a portable solution as some part of my app. connects with unix while others with windows.

Thanks in advance.
Posted
Updated 15-Nov-10 0:32am
v2
Comments
VC_RYK 17-Nov-10 22:19pm    
Is there any portable way?

The C++ portable way is the use of the Standard C++ Library classes std::string and std::wstring or possibly std::vector<char> and std::vector<wchar_t> with Standard algorithms as std::copy_n, std::find etc...
cheers,
AR
 
Share this answer
 
See here[^] for a possible solution.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900