Re: [algogeeks] null macro

2011-07-02 Thread Avi Dullu
#include cstdio #define NULL1 (void *)0 #define NULL2 0 int main() { int* p = NULL1; // void* being assigned to a int*, C++ complains. int* q = NULL2; return 0; } Veni Vedi Slumber ! On Sat, Jul 2, 2011 at 10:28 PM, Decipher ankurseth...@gmail.com wrote: Hey I was asked this question

Re: [algogeeks] null macro

2011-07-01 Thread hary rathor
refer to pointer in c chapter 1 for better explanation -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to

Re: [algogeeks] null macro

2011-07-01 Thread oldman
in c++, The macro NULL is an implementation-defined C++ null pointer constant([lib.support.types), and it may be 0 or 0L, but not (void*)0 in c, it's (void*)0 On Fri, Jul 1, 2011 at 3:01 PM, hary rathor harry.rat...@gmail.com wrote: refer to pointer in c chapter 1 for better explanation --

[algogeeks] null macro

2011-06-30 Thread simran
null macro is defined as #define NULL (void*)0..is there any difference in null macro definition in c and c++? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from

Re: [algogeeks] null macro

2011-06-30 Thread amit kumar
no difference On Thu, Jun 30, 2011 at 11:24 PM, simran ngxprerna2...@gmail.com wrote: null macro is defined as #define NULL (void*)0..is there any difference in null macro definition in c and c++? -- You received this message because you are subscribed to the Google Groups Algorithm Geeks