Static arrays inside struct and class - bug?

NX via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Aug 1 10:22:38 PDT 2015


I wonder if the followings are compiler bugs:

class stuff_class
{
    byte[1024*1024*16] arr; // Error: index 16777216 overflow for 
static array
}

struct stuff
{
    byte[1024*1024*16] arr; // Error: index 16777216 overflow for 
static array
}

My project has just stopped for this reason, I was trying to hack 
into another process memory with something similar to this:
    stuff data;
    ReadProcessMemory(Proc, (void*)0xA970F4, &data, stuff.sizeof, 
null);
Target program is written in C++ and because of this limitation 
I'm not able to write equivalent code and here I'm stuck.


More information about the Digitalmars-d-learn mailing list