|
From: worlman385 on 9 Apr 2008 13:26 Does visual C++ uses a lot of non-standard C/ C++ syntax? for example - 1) near / far seem not standard C++ / standard C typedef DWORD near *PDWORD; typedef DWORD far *LPDWORD; 2) I heard the following is compiler specific _STD_BEGIN _STD_END 3) I heard the following is compiler specific __PURE_APPDOMAIN_GLOBAL extern _CRTDATA2 ostream cout;
From: Alf P. Steinbach on 9 Apr 2008 13:44 * worlman385(a)yahoo.com: > Does visual C++ uses a lot of non-standard C/ C++ syntax? A language doesn't use, users use. Visual C++ has some language extensions. > for example - > > 1) near / far seem not standard C++ / standard C > typedef DWORD near *PDWORD; > typedef DWORD far *LPDWORD; I don't think modern versions of Visual C++ support "near" and "far", but perhaps they do for backward compatibility. > 2) I heard the following is compiler specific > _STD_BEGIN > _STD_END No, those are macros that presumably belong to the implementation of the standard library. They're specific to that library implementation. You should not use them (that's indicated by the leading underscore in the names). > 3) I heard the following is compiler specific > __PURE_APPDOMAIN_GLOBAL extern _CRTDATA2 ostream cout; The macros may or may not expand to something that's compiler specific. Anyway, it's not a concern for you. The library implementation implements the library (mostly) as specified by the standard, and it's the standard you should relate to, not any particular implementation's internal code. Cheers, & hth., - Alf
From: Giovanni Dicanio on 9 Apr 2008 13:47 <worlman385(a)yahoo.com> ha scritto nel messaggio news:srupv3das4ei6nrrsvd8p8gcd9pk59qt1u(a)4ax.com... > Does visual C++ uses a lot of non-standard C/ C++ syntax? What do you mean, please? Visual C++ (at least since Visual C++ 7.1) is very C++ standard compliant. You can compile several multiplatform libraries like Boost, Blitz++, etc. with VCx (x >= 7.1) with no particular problem. If you are thinking about Win32 specific stuff, Win32 API functions are just a kind of programming "library" (with C interface), so they can have their naming conventions, their own data types and structures, etc. > 1) near / far seem not standard C++ / standard C > typedef DWORD near *PDWORD; > typedef DWORD far *LPDWORD; I believe near/far is something from the old ancient "16 bits" age. I think they (i.e. near/far) expand to nothing in modern (32 bits) Visual C++ compilers... Kind of: #define near #define far > 2) I heard the following is compiler specific > _STD_BEGIN > _STD_END I think this is STL specific stuff, used in STL *implementation*. If you use STL "public interface" (I mean: std::vector, std::string, std::map, etc.) you should not pay attention to these implementation details. I think that some of non-standard extensions specific of Visual C++ are some utilities for COM support, like __uuidof (IIRC, there was a recent thread on that). HTH, Giovanni
From: Jonathan Wood on 9 Apr 2008 14:15 VC++ has some extensions, as has been pointed out. However, by and large, VC++ is mostly standard. > 1) near / far seem not standard C++ / standard C > typedef DWORD near *PDWORD; > typedef DWORD far *LPDWORD; I'd be curious where you got this from. As far as I know, near and far have no meaning under the 32-bit compilers. Is this something old? -- Jonathan Wood SoftCircuits Programming http://www.softcircuits.com
From: Tom Walker on 9 Apr 2008 15:27 "Jonathan Wood" <jwood(a)softcircuits.com> wrote in message news:u13By2mmIHA.1212(a)TK2MSFTNGP05.phx.gbl... > VC++ has some extensions, as has been pointed out. However, by and large, > VC++ is mostly standard. > >> 1) near / far seem not standard C++ / standard C >> typedef DWORD near *PDWORD; >> typedef DWORD far *LPDWORD; > > I'd be curious where you got this from. As far as I know, near and far > have no meaning under the 32-bit compilers. Is this something old? It's in windef.h in the latest platform sdk. Of course near and far are defined to be nothing. #define far #define near
|
Next
|
Last
Pages: 1 2 Prev: global and static variable in a class delivered in a DLL Next: C or C++ |