Use %td format for ptrdiff_t data types (see: http://stackoverflow.com/questions/3597743/where-is-ptrdiff-t-defined-in-c )