ushtabalakh
Programmer
- Jun 4, 2007
- 132
int *p;
p = malloc(sizeof(int));
I receive this error : error C2440: '=' : cannot convert from 'void *' to 'int *'
I'm trying to have a dynamically allocated array of integers, After doing this how can I access the third and fourth element of this array?
p = malloc(sizeof(int));
I receive this error : error C2440: '=' : cannot convert from 'void *' to 'int *'
I'm trying to have a dynamically allocated array of integers, After doing this how can I access the third and fourth element of this array?