In the code below, what does this mean?
mine = (short *)0;
--------------
#include <iostream>
int main()
{
typedef short Example;
short *mine;
mine = (short *)0;
if(mine)
{
delete [] mine;
}
mine = new short[10];
for (int i = 0; i < 10; ++i)
mine[i] = 0;
for (int i = 0; i < 10; ++i)
std::cout << mine[i]
<< " short"
<< std::endl;
}
------------
Cheers,
Deets
mine = (short *)0;
--------------
#include <iostream>
int main()
{
typedef short Example;
short *mine;
mine = (short *)0;
if(mine)
{
delete [] mine;
}
mine = new short[10];
for (int i = 0; i < 10; ++i)
mine[i] = 0;
for (int i = 0; i < 10; ++i)
std::cout << mine[i]
<< " short"
<< std::endl;
}
------------
Cheers,
Deets
Comment