hi,
suppose i have
#....
main()
{
int n=6;(which means i am to generate a 6*6 matrix)
int **a;
and some how i allocated the memory required for 6*6 to the pointer a....
now, how do i initialise the elements of pointer a to "0" so that i can start accessing them as arrays without any junk values... coz, in my program some values r untouched and if i initialise to "0", it wud be fine, with junk its jus disappointing... i hav heard of memset command for 1d pointers, is it possible ot initialise 2d pointers using the same? thk u.
/legolas
suppose i have
#....
main()
{
int n=6;(which means i am to generate a 6*6 matrix)
int **a;
and some how i allocated the memory required for 6*6 to the pointer a....
now, how do i initialise the elements of pointer a to "0" so that i can start accessing them as arrays without any junk values... coz, in my program some values r untouched and if i initialise to "0", it wud be fine, with junk its jus disappointing... i hav heard of memset command for 1d pointers, is it possible ot initialise 2d pointers using the same? thk u.
/legolas