Facebook Page Twitter Page LinkedIn Page
× C++ Standard Library C++ STL Library

The C++ <cstdio> TMP_MAX is a macro constant that expands to maximum number of unique temporary file names that are guaranteed to be possible to generate using tmpnam() function.

In the <cstdio> header file, it is defined as follows:

#define TMP_MAX /*implementation defined*/             


The below example shows the value of TMP_MAX constant on a given implementation.

#include <cstdio>
int main (){
  //displaying the value of TMP_MAX
  printf("TMP_MAX = %d\n", TMP_MAX);
  return 0;

One of the possible output of the above code could be:

TMP_MAX = 238328

❮ C++ <cstdio> Library