0

Reinterpret cast error .please give me solution

Sir there is an error in this statement While(infile.eof() ) { If(infile.read(reinterpret_cast<char*>(this),sizeof(*this)) >0) { If(strcmp (pf, profession) == 0 ) { Showlist(); Flag =1; P++; Return; } } } The error is in ">" operator. " no operator matches '>' these operands " Please give me solution

30th Dec 2021, 12:09 PM
RAJESH HIRAJI PAWAR
RAJESH HIRAJI PAWAR - avatar
1 Resposta
+ 1
You need to put the > inside if the paranthesis. Like this: if(infile.read(reinterpret_cast<char*>(this) > 0)
30th Dec 2021, 12:35 PM
SimZooo
SimZooo - avatar