how to allocate memory for a two dimensional array dynamically please need code for that one
srinath.sec 0
Newbie Poster
Recommended Answers
Jump to Posthow to allocate memory for a two dimensional array dynamically please need code for that one
you need a pointer to pointer like
int **myArray;
then, first allocate for the int ** like
myArray = (int**)malloc(sizeof(int*) * HOW_MANY);
and then for the int * …
All 4 Replies
fulyaoner 0
Light Poster
vijayan121 1,152
Posting Virtuoso
rollingstones -1
Newbie Poster
John A 1,896
Vampirical Lurker Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.