Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 11-20-2007, 03:23 PM   #1 (permalink)
complete
Code Monkey
 
complete's Avatar
 
Join Date: Jul 2005
Location: St. Louis
Posts: 71
complete is on a distinguished road
I got this compile warning:

I got this compile warning:

warning C4996: '_ltoa' was declared deprecated

OK, so what should I use instead of ltoa?
__________________
46 45 52 4D 49 20 57 41 53 20 4A 45 44 49 2E 10
20 53 41 47 41 4E 20 57 41 53 20 53 49 54 48 2E
complete is offline   Reply With Quote
Old 11-21-2007, 04:35 AM   #2 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 651
DJMaze is on a distinguished road
The ltoa POSIX function is deprecated beginning in M$ Visual C++ 2005.
Use the ISO C++ conformant _ltoa or security-enhanced _ltoa_s instead.

The _ltoa function is deprecated if the security-enhanced _ltoa_s exists.

Security Enhancements in the CRT

So in M$VC++ use _s wherever you can.
It would be wise to have everything _s and then a definitions file to define macro's if a *_s doesn't exist.

Solution sounds stupid so i always use my own macro's similar to:
Code:
#ifdef w32
  #define maze_ltoa _ltoa_s
#else
  #define maze_ltoa ltoa
#endif
__________________

UT: Ultra-kill... God like!
DJMaze is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
warning cannot create pre compiled header: initialized data in header Nielszz Platform/API C++ 2 06-28-2005 01:06 PM
Compile errors glennandrewcoop Standard C, C++ 3 04-17-2005 12:22 PM
ActiveX warning problem IGC HTML, XML, Javascript, AJAX 1 04-04-2005 11:31 AM
mysql auto_increment warning gwartheg PHP 1 06-11-2003 01:25 PM
cgi script Henry PHP 25 12-30-2002 06:54 AM


All times are GMT -8. The time now is 04:35 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting