Page 1 of 1

Merge doesn't compile with C++

Posted: Wed Apr 21, 2004 2:51 pm
by romu
gflMerge works correctly with a C project, but I have to use C++, and the error occured:

Code: Select all

GFL_LOAD_PARAMS load_option; 
	GFL_FILE_INFORMATION file_info; 
	GFL_ERROR error; 
	GFL_BITMAP * bitmap_table[4], * new_bitmap; 
	GFL_INT32 opacity[4] = { 40, 25, 15, 20 }; 
	GFL_POINT points[4] = { {0, 0}, {0, 0}, {0, 0}, {0, 0} }; 
	GFL_SAVE_PARAMS save_option; 
	GFL_INT32 i; 

	for ( i=0; i<4; i++ )
	{
		gflGetDefaultLoadParams( &load_option ); 
		error = gflLoadBitmap( filename[i], &bitmap_table[i], &load_option, &file_info ); 
		if ( error )
		{
			DisplayError( filename[i], error ); 
			return; 
		}
	}
error = gflMerge( bitmap_table, points, opacity, 4, &new_bitmap ); 
the error is:

Code: Select all

error C2664: 'gflMerge' : cannot convert parameter 1 from 'GFL_BITMAP *[4]' to 'const GFL_BITMAP *[]'
any idea on how to proceed?

Re: Merge doesn't compile with C++

Posted: Sat Apr 24, 2004 8:45 am
by xnview
romu wrote: the error is:

Code: Select all

error C2664: 'gflMerge' : cannot convert parameter 1 from 'GFL_BITMAP *[4]' to 'const GFL_BITMAP *[]'
any idea on how to proceed?
If you use:

Code: Select all

error = gflMerge( (GFL_BITMAP *[])bitmap_table, points, opacity, 4, &new_bitmap );