RE: [Dev-C++] Time stamping an output file.
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ya...> - 2002-02-28 15:28:09
|
-----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of Benjamin Wheeless Sent: Thursday, February 28, 2002 4:06 PM To: dev...@li... Subject: RE: [Dev-C++] Time stamping an output file. Ioannis, You didn't let me down man. Searching every crevace for an inefficiency. I like your style. I wasn't aware that strftime() was portable to UNIX, but after looking up the function I see that it is fully ANSI C compatible...so thank you for pointing out my misleading statement about the portability. Secondly, this is just a "test" program...I specify the path in the actual production program because the program does not run in the directory where the output file is placed as is common with production environment directory structures. You are right though, if you want the output file to go into the directory from where the *.exe is run from, then you do not need to provide a path. The file is created in the path you *are* the time the program is executed. E.g. if you are in MSDOS/Windows, your exe is placed as C:\c\temp.exe , you have C:\c in the path variable and you run it from any other directory e.g. C:\program files\microsoft\world\domination, the .txt will be created in C:\program files\microsoft\world\domination . If you want the output file to go always into the directory from where the .exe is run from, only then you *do* need to provide a path. Thanks for the analysis. Have a good day. Benjamin Wheeless Network Systems - Delta Airlines, Inc. Atlanta, GA - USA 30320 ============================== Thanks for the compliments. Ioannis * Ioannis Vranos * Programming pages: <http://www.noicys.d2g.com/> http://www.noicys.d2g.com * Alternative URL: <http://run.to/noicys> http://run.to/noicys |