hi ,
i need to create an array of long integers containing 17000 elements.how do i do it? can anyone help?
thanks,pearl
Printable View
hi ,
i need to create an array of long integers containing 17000 elements.how do i do it? can anyone help?
thanks,pearl
long int array[17000];
If that's what you tried and it didn't work, then try mentioning which OS/Compiler or whatever other useful information you may have.
Did you try it and get an error from your compiler? What did the error say?
If you try to allocate arrays of very large size within a function you will often get errors because each function has a limited stack size. You can either try to allocate the array as a global, or you can have a pointer variable within your function and attempt to allocate memory for that array dynamically with a malloc call.