DOC: mktemp() Creates a Maximum of 27 Unique Filenames

This article was previously published under Q50351
This article has been archived. It is offered "as is" and will no longer be updated.
SUMMARY
In the Microsoft C online and printed documentation for the mktemp()function, it is not clear exactly how many filenames mktemp() can create.These references state the following:
When creating new names, mktemp uses, in order, "0" and the lowercase letters "a" to "z".
This information is correct. However, the documentation fails to mentionthat these are the only filenames that are created. Any further calls tomktemp() after these characters have been used will fail (that is, once "z"has been placed in the template). Therefore, the limit on the number ofunique filenames that can be created by mktemp() is 27.

NOTE: This problem was fixed in the Books On-line of Microsoft Visual C++,32-bit Edition, version 4.0.
1.00 1.50 2.00 4.00 5.10 6.00 6.00a 6.00ax 7.00
Properties

Article ID: 50351 - Last Review: 01/06/2015 00:39:32 - Revision: 2.0

  • The C Run-Time (CRT)
  • kbnosurvey kbarchive kbcrt kbdocfix KB50351
Feedback