For all list_count entries, I would like to print out e_list to a text file. However, I receive the error: "warning C4133: 'function' : incompatible types - from 'struct _iobuf *' to 'const char *"
Looking at the documentation for the error, I'm not sure how to rectify the problem. Help is greatly appreciated.
Code:
static int list_count;
static struct e_list_entry
{
signed int delta : 8;
signed int xy : 24;
signed int type : 8;
signed int c : 24;
struct e_list_entry *link;
} e_list[1000];
static void sort_horiz(void)
{
int i;
int dx, dy, d;
FILE *file;
file=fopen("C:\\myfile_c.txt", "w");
for (i = 0; i < list_count; i++)
{
dx = e_list[i].c - (ia_nx >> 1);
dy = e_list[i].xy - (ia_ny >> 1);
if(file)
{
printf(file, "%d", e_list); /* error */
fclose(file);
}
}
}