Hi--
I'm trying to parse windows.h, and I'm losing on "__int64". Where is
that defined? Does windows.h have any prerequisites? Or are there some
things
which the kernel/compilers just magically know about? I'm using MS Visual
C++
as my header source.
Thanks in advance for answering what is probably/hopefully a very basic
question.
-C
--
Craig Latta <Craig...@NetJam.ORG>
"Instant monotony! Just ad nauseum!"
this is going to sound obnoxious (sp?) but it is the simple fact.
__int64 is defined at the same place with int and long (also char).
Hope this helps.
PS this means that __int64 is a basic type of the C/C++ language implementation
of MS.
Muzaffer
standard disclaimer
Mark Thornton
Optrak Distribution Software Ltd.
It's defined as a Microsoft C extension (see the README files included
with the compiler).
__int8, __int16, __int32, and __int64 are all available in both signed
and unsigned versions Quite handy.
--
"Nothing in the world is more dangerous than sincere ignorance and
conscientious stupidity" -- Martin Luther King, Jr.
"Having a passionate committment to social justice does not excuse you from
knowing what in the hell you're talking about" -- Corollary #1
Yepp, but only with normal operators, they forgot to implement the itoa and atoi
functions ...
// JTN <j...@jd.se>
---
* Thomas Nimstad * #pragma message("Standard disclaimer in use")
* Juristdata AB, SWEDEN * Professional development for Win32
* Phone +46-500 412150 * Fax +46-500 412848
: Yepp, but only with normal operators, they forgot to implement the itoa and atoi
: functions ...
:
Is there a printf specifier for __int64?
--
Bob Withers This space is reserved.
bw...@mo.net Imagine a really cool picture here.
sscanf and sprintf are effective replacements.
--
"Nothing in the world is more dangerous than sincere ignorance and
conscientious stupidity" -- artin Luther King, Jr.
Yes. Here's some info from a VC+ 2.10 prerelease readme.
=================================================
64-bit Integers
In addition to the __int8, __int16, and __int32 "sized integer" support
documented in the C Language Reference and C++ Language Reference,
this Visual C++ 2.1 Beta release provides partial support for 64-bit
integers. To declare a 64-bit integer, use the __int64 keyword.
This release does not provide fully integrated debugger support
for 64-bit integers, but they are recognized and can be displayed by
the debugger in hexadecimal format. 64-bit integers will be fully
supported in the Visual C++ 2.1 final release version.
Using printf and scanf with 64-bit Integers
You can use the __int64 data type with the printf and scanf
function families.
A printf format specification, which consists of optional and
required fields, has the following form:
%[flags] [width] [.precision] [{h | l | I64 | L}]type
A scanf format specification, which also consists of optional
and required fields, has the form
%[*] [width] [{h | l | I64 | L}]type
The I64 optional prefix to the type specifier indicates that the
corresponding argument is a 64-bit integer. To specify _int64,
you can use the size prefix I64 with the type specifier d, i, o,
u, x, or X. The type prefix I64 is a Microsoft extension and is
not ANSI-compatible. For more information, see printf and scanf
in the Run-Time Library Reference.
--
"Nothing in the world is more dangerous than sincere ignorance and
conscientious stupidity" -- Martin Luther King, Jr.
>Thomas Nimstad (j...@jd.se) wrote:
>: muza...@smixedsignal.com writes:
>: > this means that __int64 is a basic type of the C/C++ language
> implementation
>: > of MS.
>
>: Yepp, but only with normal operators, they forgot to implement the itoa and
> atoi
>: functions ...
>:
>
>Is there a printf specifier for __int64?
Yes - add "I64" to the normal format, eg:
__int64 a;
printf( "%I64d", a );
It's documented in the VC++ release notes.
Chris
--
--------------------------------------------------------------------------
| Chris Marriott, Warrington, UK | Author of SkyMap v2 shareware |
| ch...@chrism.demon.co.uk | astronomy program for Windows. |
| For more info, see http://www.winternet.com/~jasc/skymap.html |
| Author member of Association of Shareware Professionals (ASP) |
--------------------------------------------------------------------------
I just found it :
__int64 Value = 0xffffffff;
Value++;
sprintf(text, "Value = %I64x", Value);
Cool !