| | |
C++ Array Size Limit?
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
When I try to compile this:
It gives me this error:
------ Build started: Project: TheAlienEngine, Configuration: Debug Win32 ------
Compiling...
main.cpp
c:\documents and settings\tom\my documents\visual studio 2008\projects\thealienengine\thealienengine\ae_3d.h(12) : error C2148: total size of array must not exceed 0x7fffffff bytes
Generating Code...
Compiling...
core.cpp
c:\documents and settings\tom\my documents\visual studio 2008\projects\thealienengine\thealienengine\ae_3d.h(12) : error C2148: total size of array must not exceed 0x7fffffff bytes
Generating Code...
Compiling...
ae_3d.cpp
c:\documents and settings\tom\my documents\visual studio 2008\projects\thealienengine\thealienengine\ae_3d.h(12) : error C2148: total size of array must not exceed 0x7fffffff bytes
c:\documents and settings\tom\my documents\visual studio 2008\projects\thealienengine\thealienengine\ae_3d.cpp(7) : error C2148: total size of array must not exceed 0x7fffffff bytes
c:\documents and settings\tom\my documents\visual studio 2008\projects\thealienengine\thealienengine\ae_3d.cpp(7) : error C2148: total size of array must not exceed 0x7fffffff bytes
Generating Code...
Build log was saved at "file://c:\Documents and Settings\tom\My Documents\Visual Studio 2008\Projects\TheAlienEngine\TheAlienEngine\Debug\BuildLog.htm"
TheAlienEngine - 5 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I can only get it to compile if I lower this limit to around 500.. this is not acceptable because I'm making a 3D engine and every object in my world will be a node_t...
Is there any way to fix this?
C++ Syntax (Toggle Plain Text)
#define NODES_MAX 100000 extern node_t _nodes[NODES_MAX];
It gives me this error:
------ Build started: Project: TheAlienEngine, Configuration: Debug Win32 ------
Compiling...
main.cpp
c:\documents and settings\tom\my documents\visual studio 2008\projects\thealienengine\thealienengine\ae_3d.h(12) : error C2148: total size of array must not exceed 0x7fffffff bytes
Generating Code...
Compiling...
core.cpp
c:\documents and settings\tom\my documents\visual studio 2008\projects\thealienengine\thealienengine\ae_3d.h(12) : error C2148: total size of array must not exceed 0x7fffffff bytes
Generating Code...
Compiling...
ae_3d.cpp
c:\documents and settings\tom\my documents\visual studio 2008\projects\thealienengine\thealienengine\ae_3d.h(12) : error C2148: total size of array must not exceed 0x7fffffff bytes
c:\documents and settings\tom\my documents\visual studio 2008\projects\thealienengine\thealienengine\ae_3d.cpp(7) : error C2148: total size of array must not exceed 0x7fffffff bytes
c:\documents and settings\tom\my documents\visual studio 2008\projects\thealienengine\thealienengine\ae_3d.cpp(7) : error C2148: total size of array must not exceed 0x7fffffff bytes
Generating Code...
Build log was saved at "file://c:\Documents and Settings\tom\My Documents\Visual Studio 2008\Projects\TheAlienEngine\TheAlienEngine\Debug\BuildLog.htm"
TheAlienEngine - 5 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
I can only get it to compile if I lower this limit to around 500.. this is not acceptable because I'm making a 3D engine and every object in my world will be a node_t...
Is there any way to fix this?
...
0
#3 Oct 26th, 2009
I did that, and now it compiles, but now when I run it I get this:
Unhandled exception at 0x00419537 in TheAlienEngine.exe: 0xC00000FD: Stack overflow.
And it points to this:
Here is the definition of node_t:
Unhandled exception at 0x00419537 in TheAlienEngine.exe: 0xC00000FD: Stack overflow.
And it points to this:
c++ Syntax (Toggle Plain Text)
std::vector<node_t> _nodes(NODES_MAX);
Here is the definition of node_t:
c++ Syntax (Toggle Plain Text)
#ifndef NODE_T #define NODE_T #include "vec_t.h" #include "model_t.h" extern int nodes_counter; struct node_t{ int id; vec_t origin, position, rotation; model_t model; model_t collision_mask; void setPosition(vec_t pos) { position = pos; } void setRotation(vec_t rot) { position = rot; } }; #endif
...
![]() |
Similar Threads
- my array is not sorting (C++)
- user defined array size (C++)
- Array's Size Problem (C++)
- user given array size (C++)
- string array size (C++)
- works for static need help to make it dynamic (C++)
- Size limit notification in outlook 2000 (Windows NT / 2000 / XP)
Other Threads in the C++ Forum
- Previous Thread: checking a palindrom in linked list
- Next Thread: my code for the DynamicArray and matrix problem!!!!
| Thread Tools | Search this Thread |
api array arrays beginner binary bitmap c++ c/c++ calculator char class classes code compile compiler console conversion convert count data database delete desktop developer directshow dll download dynamic encryption error file forms fstream function functions game generator getline givemetehcodez google graph gui homeworkhelper iamthwee ifstream input int integer java lib linkedlist linker linux loop looping loops map math matrix memory multiple news node number output parameter pointer problem program programming project proxy python random read recursion recursive return string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock word wordfrequency wxwidgets





