CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   FLUENT (http://www.cfd-online.com/Forums/fluent/)
-   -   how to check the existence of a file (http://www.cfd-online.com/Forums/fluent/93348-how-check-existence-file.html)

jht529100 October 12, 2011 09:04

how to check the existence of a file
 
dear guys:
i recently write a udf,in order to check the existence of one file,i used the access function,(if (access(filename,0)==0).it works in vs-2005,but when i compile it in fluent,the error occur and it can't be compiled,any hints may help,thanks!

coglione October 13, 2011 03:39

File *output_file;
if (!(output_file = fopen(filename,"r")))
Error("unable to open file");

checks wether a file "filename" can be opened or not.

cheers


All times are GMT -4. The time now is 06:12.