Try using the %zu
format string
size_t val = get_the_value();
printf("%zu",val);
The z portion is a length specifier which says the argument will be size_t in length.
Source – http://en.wikipedia.org/wiki/Printf#printf_format_placeholders
More Related Contents:
- what is the different between 'new()' int and 'int *p' [closed]
- Can I call a constructor from another constructor (do constructor chaining) in C++?
- Why aren’t my include guards preventing recursive inclusion and multiple symbol definitions?
- Reading a password from std::cin
- Initialization Order of Class Data Members
- Modular arithmetics and NTT (finite field DFT) optimizations
- Global memory management in C++ in stack or heap?
- Unresolved external symbol in object files
- Finding all the subsets of a set
- Creating an input stream from constant memory
- Sleep function in C++
- How to create NVIDIA OpenCL project
- C++ Winsock P2P
- Why don’t the C or C++ standards explicitly define char as signed or unsigned?
- What do each memory_order mean?
- Create new C++ object at specific memory address?
- How to read a growing text file in C++?
- 5 years later, is there something better than the “Fastest Possible C++ Delegates”?
- When should you use the “this” keyword in C++? [duplicate]
- Use of the & operator in C++ function signatures
- how to test a string for letters only
- what is/are the purpose(s) of inline?
- Error with address of parenthesized member function
- How to (un)escape strings in C/C++?
- Using bts assembly instruction with gcc compiler
- Why sizeof int is wrong, while sizeof(int) is right?
- Does C have One Definition Rule like C++?
- Why does pointer to int convert to void* but pointer to function convert to bool?
- OpenCV Edge/Border detection based on color
- Different execution policies at runtime