[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] C++, fopen() not functioning?

Hello,
I'm trying to open a file with fopen(), the file is located in the CWD specified in the project properties yet is unable to open?


FILE *fp;
char* filename = "TrackOval.ppm";
fp = fopen( filename, "rb" );
if( fp == NULL )
{
	fprintf( stderr, "Cannot open file '%s'\n", filename );
	exit(0);
}

OutPut:
Cannot open file 'TrackOval.ppm'

CWD: C:\Users\Douglas\workspace\Proj\Debug
File Path: C:\Users\Douglas\workspace\Proj\Debug\TrasckOval.ppm

Looking for some help in solving this. Otherwise I may have to resort to not using eclipse!
Thanks.