| | |
Max size of Array
Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
![]() |
Hello
I'm working on an application.
I need as big arrays as possible. At home I work with linux there I can declare array as big as this: char buffer[1000000]. No probleme.
In work I'm working with boreland C++ 4.5 (WinXp) and I can't declare biger size of array as buffer[20000].
It tels me << constant is long << and << array size too large;
It is possible to change this? or Is there some reason to not declare bigger Arrays like this?
Please help...
I'm working on an application.
I need as big arrays as possible. At home I work with linux there I can declare array as big as this: char buffer[1000000]. No probleme.
In work I'm working with boreland C++ 4.5 (WinXp) and I can't declare biger size of array as buffer[20000].
It tels me << constant is long << and << array size too large;
It is possible to change this? or Is there some reason to not declare bigger Arrays like this?
Please help...
•
•
•
•
Hello
I'm working on an application.
I need as big arrays as possible. At home I work with linux there I can declare array as big as this: char buffer[1000000]. No probleme.
In work I'm working with boreland C++ 4.5 (WinXp) and I can't declare biger size of array as buffer[20000].
It tels me << constant is long << and << array size too large;
It is possible to change this? or Is there some reason to not declare bigger Arrays like this?
Please help...
If you want to win, you must not loose (Alan Ford)
Depends on which version of that compiler is used -- 16-bit MS-DOS or 32-bit MS-Windows? 16-bit can create arrays up to only 64,000 bytes (large memory model), or 16,000 long integers. There is no work-around other than to redesign your program or use a modern 32-bit compiler, which is one reason MS-DOS is dead and buried.
Borland 4.5 is a 16 bit compiler. Upgrade to Borland 5.5 for 32 bit.
The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
@ slake
Why stick to Borland ???
If you are thinking about compiler migration better go for the free Visual Studio 2005 free edition or for GCC mingw compiler which nowadays most of the people use.
Why stick to Borland ???
If you are thinking about compiler migration better go for the free Visual Studio 2005 free edition or for GCC mingw compiler which nowadays most of the people use.
I don't accept change; I don't deserve to live.
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
•
•
•
•
Why not? There's nothing wrong with the Borland compiler. It's when a bad compiler is in use you should change. But when you get right down to it, for the most part if it does the job, any compiler will do.
BTW since you seem to be a Borland proponent you might want to take a look here:
http://www.willus.com/ccomp_benchmark.shtml?p6
http://www.willus.com/ccomp.shtml?p03
Nothing personal, just found these when i was once looking for good compilers.
I don't accept change; I don't deserve to live.
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
boaland 5.5 and earlier have the same problem as VC++ 6.0 -- they are too old and do not support current C++ standards very well. And that is a big problem for new people who are trying to learn modern c++ with an ancient compiler. There are a few legatimate reasons I can think of for using those old compilers (such as support of legacy programs) but most people should be using newer compilers. when you say "they work" do you mean they work with code written in 2006 or code written in the 1980s and 1990s (10 years is a lifetime in the software and compiler industries!) The last time c++ standards were upgraded was in 1999 which is well after those borland and microsoft vc++ 6.0 compilers were produced.
•
•
•
•
@ slake
Why stick to Borland ???
If you are thinking about compiler migration better go for the free Visual Studio 2005 free edition or for GCC mingw compiler which nowadays most of the people use.
The Visual Studio 2005 free edition is huge! Kind of takes over your computer. I would go for GCC which is part of the free Dev-C++ IDE.
drink her pretty
![]() |
Views: 11418 | Replies: 14
| Thread Tools | Search this Thread |
Tag cloud for C++
6 api application array arrays assignment based beginner binary c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete developer display dll dynamiccharacterarray email encryption error file format forms fstream function functions game generator givemetehcodez graph iamthwee ifstream image input int java lib list loop looping loops map math matrix memory multidimensional multiple newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg search sort sorting string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






