|
Prev: How to compare two object?
Next: DLLs
From: Jack on 24 Jan 2006 22:27 If I still make use of functions like strcpy, would the final machine code for that little part be 16-bit? Say strcpy (hello, hello2) mov ax, offser hello ..... if I use cout << hello then mov eax, offset hello Thanks Jack
From: William DePalo [MVP VC++] on 25 Jan 2006 01:15 "Jack" <jl(a)knight.com> wrote in message news:OanE28VIGHA.1124(a)TK2MSFTNGP10.phx.gbl... > If I still make use of functions like strcpy, would the final machine code > for that little part be 16-bit? No. It simply means that the usage of the function is discouraged and at some time in the future it _may_ be removed from the library. Regards, Will
From: Sandeep on 25 Jan 2006 13:15 William DePalo [MVP VC++] wrote: > "Jack" <jl(a)knight.com> wrote in message > news:OanE28VIGHA.1124(a)TK2MSFTNGP10.phx.gbl... > > If I still make use of functions like strcpy, would the final machine code > > for that little part be 16-bit? > > No. It simply means that the usage of the function is discouraged and at > some time in the future it _may_ be removed from the library. removing functions like strcpy would mean giving up the compatibility with C , even though you did mention it as a _may_ , i am still interested in knowing _why_ are these methods deprecated in vc8 - Is it something to to with preference of "string" over "char *" in c++. does this also mean that strcpy is deprecated in the c++ standard too ? if not , is vc8 moving further away from ISO c++ ?
From: Frank Hickman [MVP] on 25 Jan 2006 13:27 "Sandeep" <sandeepsinghal(a)gmail.com> wrote in message news:1138212935.019303.233830(a)g49g2000cwa.googlegroups.com... > > William DePalo [MVP VC++] wrote: >> "Jack" <jl(a)knight.com> wrote in message >> news:OanE28VIGHA.1124(a)TK2MSFTNGP10.phx.gbl... >> > If I still make use of functions like strcpy, would the final machine >> > code >> > for that little part be 16-bit? >> >> No. It simply means that the usage of the function is discouraged and at >> some time in the future it _may_ be removed from the library. > > removing functions like strcpy would mean giving up the compatibility > with C , even though you did mention it as a _may_ , i am still > interested in knowing _why_ are these methods deprecated in vc8 - Is > it something to to with preference of "string" over "char *" in c++. > does this also mean that strcpy is deprecated in the c++ standard too ? > if not , is vc8 moving further away from ISO c++ ? > AFAIK, the reason this particular function is "depreciated" in VC8 is that a replacement function was written that does buffer checking, for security. -- ============ Frank Hickman Microsoft MVP NobleSoft, Inc. ============ Replace the _nosp(a)m_ with @ to reply.
From: Igor Tandetnik on 25 Jan 2006 13:33
Sandeep <sandeepsinghal(a)gmail.com> wrote: > William DePalo [MVP VC++] wrote: >> "Jack" <jl(a)knight.com> wrote in message >> news:OanE28VIGHA.1124(a)TK2MSFTNGP10.phx.gbl... >>> If I still make use of functions like strcpy, would the final >>> machine code for that little part be 16-bit? >> >> No. It simply means that the usage of the function is discouraged >> and at some time in the future it _may_ be removed from the library. > > removing functions like strcpy would mean giving up the compatibility > with C , even though you did mention it as a _may_ , i am still > interested in knowing _why_ are these methods deprecated in vc8 They are not really deprecated, in the sense that there are no plans to remove them any time soon. It's just that #pragma deprecated is the only available mechanism at this time to produce a warning every time a function is used, hence a somewhat misleading message. As to the reason for the warning, see http://msdn2.microsoft.com/en-US/library/8ef0s5kh.aspx -- With best wishes, Igor Tandetnik With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925 |