1849492 Members
5947 Online
104044 Solutions
New Discussion

long long type

 
Gal Menahem
New Member

long long type

I'm looking for a corresponding C++ HP UNIX type for long long (in C HP UNIX) or __int64 (in MicroSoft).
Thank you in advance for your assistance.
3 REPLIES 3
Curtis Larson
Trusted Contributor

Re: long long type

Data Compatibility between C and C++

Since C++ is a superset of C, many of the data types are identical. Both languages have the identical primitive types char, short, int, long, float, and double. ANSI C and C++ also support a long double type (and include a language extension for a long long type for versions 10.22 and later.)
Curtis Larson
Trusted Contributor

Re: long long type

In 64-bit mode, long and pointer types are 64 bits in size, and integers are 32 bits.

Applications written in HP C++ (cfront) must be migrated to aC++ prior to compiling in 64-bit mode. For information on migrating to aC++, see HP aC++ Migration Guide , URL: http://www.hp.com/lang/cpp/.

To compile in 64-bit mode, use the +DA2.0W command line option.

+DA2.0W = Compiles in 64-bit mode for the PA-RISC 2.0 architecture. The macros __LP64__ and _PA_RISC2_0 are #defined.

+DA2.0N = Compiles in 32-bit mode for the PA-RISC 2.0 architecture. The macro _PA_RISC2_0 is #defined. (Same as +DA2.0.)

Kenneth Platz
Esteemed Contributor

Re: long long type

Gal,

The ANSI C++ compiler (aCC) will support the "long long" data type, provided you compile with the "-ext" command-line option. I have verified this using version B.01.18 of the ANSI C++ compiler on an HP-UX system.

I hope this helps.
I think, therefore I am... I think!