Pinned topic Getting "cannot convert int to FILE *" error message
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
I am getting the following error message while running the below given code snippet with xlC v8 compiler on AIX 5.3.
Error: Cannot convert int to FILE *
using namespace std;
if(fdd == -1 )
The same code works with non-standard headers fstream.h and iostream.h but with standard headers it is not working. Does anybody has any idea how to resolve this error with standard headers?
Thanks in advance,
Updated on 2010-05-10T01:13:19Z at 2010-05-10T01:13:19Z by vijayka
vijayka 0600007CH62 Posts
Re: Getting "cannot convert int to FILE *" error message2010-05-10T01:13:19ZThis is the accepted answer. This is the accepted answer.
It seems that fstream is defines fdd() to return FILE * type that gets picked up from yvals.h where _Filet is defined as FILE.
I think using fstream.h and iostream.h is the best alternative as I checked this in version 10.1 of XLC compiler.