PracticeDev/study_cpp/cpp_primer_source_code/Chapter 17/realwrld.cpp

20 lines
450 B
C++
Raw Normal View History

2022-12-20 17:31:11 +08:00
#include <cstdio>
#include <iostream>
int main()
{
using namespace std;
cout << "This system can generate up to " << TMP_MAX
<< " temporary names of up to " << L_tmpnam
<< " characters.\n";
char pszName[ L_tmpnam ] = {'\0'};
cout << "Here are ten names:\n";
for( int i=0; 10 > i; i++ )
{
tmpnam( pszName );
cout << pszName << endl;
}
// cin.get();
return 0;
}