I have a following piece of code for writing to file:
#define MAXITEMS (10)
int eItem; //Item id
int eDwnlditemsSt; //Item Download status
bool Dwnldreq; //Is download req
char pUrl; //Download Url
char pathstored; // path were it is stored
int offset; //offset for next based on item state
void WriteToFlash(FILE *fptr)
//Can this be done:
for(int i = 0; i<MAXITEMS; i++)
fmineptr = fopen("mine.txt","w+");
if(fmineptr == NULL)
ListOfItemsWrite[i].Dwnldreq = 1;
ListOfItemsWrite[i].pathstored = "Some path";
ListOfItemsWrite[i].pUrl = "My path";
1. I have errors while compiling:
1> No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
1>d:\source\trystructread\trystructread\trystructr ead\trystructread.cpp(52) : error C2440: '=' : cannot convert from 'const char ' to 'char '
1> There is no context in which this conversion is possible
1>d:\source\trystructread\trystructread\trystructr ead\trystructread.cpp(53) : error C2440: '=' : cannot convert from 'const char ' to 'char '
2. I am have to write an entire structure to a File.