I got few C++ questions:
1)
--
NULL vs (int *)0
what's the difference between:
and
compilignnng a code with int*i = NULL gives me:
what causes this ?
2)
--
Why the following doesnt cause error:
3)
--
What's the difference between:
and
Thanx for the help
1)
--
NULL vs (int *)0
what's the difference between:
Code:
int *i = NULL
Code:
int *i = (int *)0
compilignnng a code with int*i = NULL gives me:
Code:
In function `int main()':
error: `NULL' undeclared (first use this function)
error: (Each undeclared identifier is reported only once for each function it appears in.)
what causes this ?
2)
--
Why the following doesnt cause error:
Code:
int *i = (int *)0;
delete i;
3)
--
What's the difference between:
Code:
int * array = new int[100];
Code:
int array[100]
Thanx for the help