Thursday, April 8, 2010

Will it core ??? if yes where


My First Answer was yes De-Referencing NULL pointer will core at line 15
This is wrong function is binded to class not an object compiler just checks the TYPE of pointer and calls Func1 Successfully
It cores at line 16 where in function s=0; is done
Thing is as long as no instance attribute is used in the func(), and the method is not virtual   , NULL pointer  need not to be dereferenced.

1 comment:

Followers