FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
C++
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
February 01, 2001
The New C

Integers, Part 3

(Page 1 of 2)
Randy Meyers
At first glance, C99's new integral types seem to threaten its portability. But a few added headers and typedefs improve the outlook dramatically.
February 2001/The New C/Listing 1

Listing 1: Using string literal concatenation with C99 <inttypes.h> macros to create format specifiers for scanf and printf

#include <stdio.h>
#include <inttypes.h>
int main()
{
    int_fast64_t x;
    scanf("%" SCNdFAST64, &x);
    printf("x=%08" PRIdFAST64 "\n", x);
    return 0;
}
— End of Listing —
1 | 2 Next Page
RELATED ARTICLES
No Related Articles
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK