468,469 Members | 2,320 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,469 developers. It's quick & easy.

how to create huge arrays in c/c++

hello;
i need to create a very long array in c of the foll specification:
a[640][480]
however i get an error telling that the array's size is too large.the help file advices either to use malloc or huge
can anyone help me how to use "huge"command?
any other methods without using pointers is recommended.
Thanking you;
Vipin
Jul 9 '06 #1
1 1974
hello;
i need to create a very long array in c of the foll specification:
a[640][480]
however i get an error telling that the array's size is too large.the help file advices either to use malloc or huge
can anyone help me how to use "huge"command?
any other methods without using pointers is recommended.
Thanking you;
Vipin

Hi,
I dont know on which platform you are working on becoz the array size that you have mentioned can be easily allocated on windows based C application. But using malloc is always a good programming teqnique because it utilizes the unused memory blocks. And if malloc is used then pointer is a must. I suggest you to use pointer, infact pointer will be more convinient than any other method.
Jul 13 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

10 posts views Thread by Fabian | last post: by
4 posts views Thread by RubenDV | last post: by
6 posts views Thread by Michael Gray | last post: by
8 posts views Thread by luke.yolanda | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by kmladenovski | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.