Compiler Error C2440

'conversion' : cannot convert from 'type1' to 'type2'

The compiler was unable to cast from ‘type1’ to ‘type2.’ If you’ve encountered this error on code which compiled with an earlier version of Visual C++, please read Technote: Improved Conformance to ANSI C++ for more information.

The following example illustrates this error.

void main()
{

   
   int *i;
   float j;
   
   j = (float)i; /* cannot cast from
              pointer to int to float */


}