Search notes:

C++ Standard Library: tmpnam

#include <cstdio>
#include <iostream>

int main() {

  char* tmp_file_name;

  tmp_file_name = tmpnam(nullptr);

  std::cout << "tmp_file_name: " << tmp_file_name << std::endl;

}
Github repository about-cpp-standard-library, path: /cstdio/tmpnam.cpp
Note: g++ gives a compiler warning: the use of tmpnam' is dangerous, better use mkstemp'.

See also

C++ Standard Library

Index