GLBasic forum

Codesnippets => Inline / 3rd party => Topic started by: MrTAToad on 2010-Jun-02

Title: Temporary filename
Post by: MrTAToad on 2010-Jun-02
This generates a temporary filename - used to writing temporary data.  Note :  On a Windows machine, the filename includes a "\" character, meaning you will eithe rhave to append "." to it, or remove it

Code (glbasic) Select
INLINE
extern "C" char * tmpnam ( char * str );
ENDINLINE

FUNCTION generateTempName$:
LOCAL result$

INLINE
result_Str.assign(tmpnam(NULL));
ENDINLINE

RETURN result$
ENDFUNCTION