473,397 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

array size limitation is too small

Hi,

I am having difficulty with arrays because of the limitation of the size of the arrays that I can declare.
I need sizes that are very large and windows or C# does not allow me to create bigger than the following for example:

public static int[] gaPoints = new int[20000000000000000000 + 1];

I get an error message saying that "integral size is too large".

I need to be able to declare sizes that are even much larger than the abovementioned size.

How can I circumvent this problem?

Do I have to use something other than arrays?


TIA
Roy
Mar 24 '13 #1
5 1838
Cant you try with using for loops?
Mar 24 '13 #2
@anugrahbala10
I could but it would slow it down drastically!

Therein lies the problem!

Speed!!!! :)

Roy
Mar 24 '13 #3
Rabbit
12,516 Expert Mod 8TB
What are you doing that requires an array of that size?
Mar 25 '13 #4
@Rabbit
I am doing Graph Isomorphism (G.I.P.).

Actually those sizes are quite small! :)
Mar 25 '13 #5
r035198x
13,262 8TB
C# will be a lot easier to code in if you solve most problems using object oriented programming principles.
Consider a class, called say ListAggregate that holds one List of List. When you run out of numbers in the one List you just add another List to the collection of lists and continue from there.
That way you have at least N*N values that you can store where N is the maximum number of items that a C# list can hold. If this runs out there are other ways of extending it as well.
Mar 25 '13 #6

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

Similar topics

0
by: Pat | last post by:
I am having a problem with large pdf files begin generated by fop from cocoon. There appears to be a file size limitation on the generated pdf files. When we run a small document everything works...
1
by: Sharon | last post by:
Hello, Is there a size limitation when using 'named pipes' on Windows OS ? If yes - how to forward a large size buffer ? Thanks
13
by: HappyHippy | last post by:
Hi, I'm wondering what you think about this piece of code: #include<iostream> int main() { int size; std::cin >> size;
7
by: arkobose | last post by:
hey everyone! i have this little problem. consider the following declaration: char *array = {"wilson", "string of any size", "etc", "input"}; this is a common data structure used to store...
4
by: Bilgehan.Balban | last post by:
Hi, The following code: #include <stdio.h> // const int const_asize = 10; #define define_asize = 10; int array = {1,2,3,4,5,6,7,8,9,0};
22
by: Vijay | last post by:
With the option strict On set..... Dim fs As FileStream = File.OpenRead(strFile) With fs Dim buffer(fs.Length) As Byte ' <--- Option Strict On disallows implicit conversions from 'Long' to...
11
by: shreesh | last post by:
I want to use an array of size greater than ARRAY but am getting an array size too large error. I am using a BC 3.1 on msdos ver 5.1.2600 on XP. How can i get around this simple but irritating...
2
by: Harry | last post by:
Good Day To all, When i am declaring a array for e.g char ....it means i am declaring array of 45 characters each of which has a maximum,minimum value limit or range...for example in...
1
by: amiben | last post by:
Hi everyone. I have an .asp file that is included in my sites pages which holds information in a string array. The array is so large that the include file is almost 900kb in size. Some array...
4
by: leegold58 | last post by:
Hi, Is there a "way around" the size limitation for Access? I'm thinking of something like spanning a huge table accross multiple databases... Something simple and that would preserve the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.