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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Newbie Question 8
Bluetooth Programming 13
Undeclared identifier 3
i can't define a string - help 3
_beginthread() 6
Upgrading from .NET 1.1 to .NET 2.0 15
Problem with template class in Managed C++ 5
dumb question... 5

Back
Top