C: Dynamic Memory Allocation (2-d Array)

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
User avatar
nigma
DevNet Resident
Posts: 1094
Joined: Sat Jan 25, 2003 1:49 am

C: Dynamic Memory Allocation (2-d Array)

Post by nigma »

Hey,

I am trying to create a program that will search for words within a crossword puzzle. Right now I am thinking that storing the crossword puzzle in a 2-d array would be the easiest to work with when searching for the words, but if I want to do that then I need to allocate memory for the array. The problem is, I don't know what the size of the crossword puzzle will be, so I would have to find that out from the user, and then allocate memory for the array. I don't know how to do this.

I am hoping someone knows how to do this, or can fill me in on a better accomplish what I am trying to do.

Thanks for any help / advice provided.
Post Reply