On 28 Mar 2007 06:29:36 -0700, Karthikeyan M <[EMAIL PROTECTED]>
wrote:
>
>
> We can declare array dynamically in C++ I think.
>
> Just declare, int ArrayName [int size1] [int size2];
>
> Get the size1 and size2 from user.
>
> Please correct me if I'm wrong.
>
> Regards,
>
> Karthikeyan M
>
> Love is magic,
>
> Rem'ber,
>
> Magic is an illusion.
>


I am afraid you can't. You need to specify the size when declaring an array.
Go for allocating memory using malloc.

Or if you want to use array then declare something like that(though not that
optimal):

#define MAX_SIZE 1024

char arr[MAX_SIZE][MAX_SIZE]

But make sure that whatever the use inputs is less than MAX_SIZE.

-- 
Regards
Sumit Chawla ("eNetra : Hail the Invention")


"Computers are useless. They can only give you answers.":Pablo Picasso


[Non-text portions of this message have been removed]

Reply via email to