Questions tagged [ptrdiff-t]

In the C programming language, ptrdiff_t is the signed integer type of the result of subtracting two pointers.

In the C programming language, ptrdiff_t is the signed integer type of the result of subtracting two pointers.

See the C programming language,ISO/IEC 9899:201x specification for more details.

17 questions
0
votes
1 answer

Cross platform version of __PTRDIFF_TYPE__

Is there a cross-platform way to determine whether ptrdiff_t is the same as long or long long during preprocessing? I know __PTRDIFF_TYPE__ should give the type with gcc/g++, but it doesn't seem to be defined in VC/VC++ for Windows. Is there a…
Alec
  • 583
  • 3
  • 21
-1
votes
1 answer

std::ptrdiff_t' has not been declared

I have made my own source file, and I'm trying to add stddef.h. At compiling I have the following error: std::ptrdiff_t' has not been declared. What I've done wrong?
infernalcucumber
  • 103
  • 1
  • 12
1
2