From: eyal DOT ben-david AT aks DOT com To: morphine AT hops DOT cs DOT jhu DOT edu cc: djgpp AT delorie DOT com Message-ID: <422564FD.005B6F93.00@aks.com> Date: Sun, 24 Aug 1997 18:47:10 +0200 Subject: Re: file_exists() Mime-Version: 1.0 Content-type: text/plain; charset=US-ASCII Precedence: bulk On 8/24/97 5:22:56 AM Michael Phelps wrote: >On Fri, 22 Aug 1997 Marco DOT Monteiro AT delorie DOT com wrote: > >> Hello, >> >> how can i inspect if a file exists? >> I'm using the function following function; is there a better one? >> > in C++ this could be written as follows: #include bool file_exist(const char* filename) { return ifstream(filename, ios::in | ios::nocreate).good(); } Eyal.