NULL undeclared identifier !

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello
I'd like to clear a picturebox
I used
pictureBox1->Image=NULL;
but I obtained
NULL undeclared identifier
please, what is the problem?
 
Hi tlemcenvisit!
I'd like to clear a picturebox
I used
pictureBox1->Image=NULL;
but I obtained
NULL undeclared identifier
please, what is the problem?

#include <windows.h>

But if this is managed-C++ you should just use "0".

For VC2005 you can also use "null".

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
 
I'm in VC++2005 (managed C++) and I used 'null' , then I obtained the same
think 'null undeclared identifier' and when I used '0' I obtained 'cannot
convert from 'int' to 'System::Drawing::Image ^''
Please, what is the problem?
 
tlemcenvisit said:
I'm in VC++2005 (managed C++) and I used 'null' , then I obtained the
same think 'null undeclared identifier' and when I used '0' I
obtained 'cannot convert from 'int' to 'System::Drawing::Image ^''
Please, what is the problem?

use nullptr instead of null (which is the C# keyword).

-cd
 
Back
Top