[comp.lang.c++] fopen

cs161fdu@sdcc10.ucsd.edu (Don't crash sdcc10) (01/21/90)

I have a question:

Is there a reason why fopen will not work in my subroutines that are in a 
different file? fopen works when it is contained in the main program, but
when I put a routine containing fopen in a separate file, statements coming
after the fopen statements are never reached.  Once fopen is reached, the
routine seems to start over again.  I've check the code and everything is
correct to my knowledge.

Is.  File roughly looks like this:

int routine()
{
.
.
.
FILE *fp;
fp=fopen("Anyfile","r"0;); //where "Anyfile" can be anyfile: ie.  test.data

.
.
.
return something;
}

The problem is that program execution does not go past fp=fopen(....).
The code is the exact same code in the main routine, so it should work.
I've tried playing with it, but no success.

Any help would be appreciated...

Gary (cs161fdu)