Error while trying to allocate memory (malloc)

Andrej Mitrovic andrej.mitrovich at gmail.com
Mon Aug 6 08:35:54 PDT 2012


On 8/6/12, Eyyub <eyyub.pangearaion at gmail.com> wrote:
> Tell me if I'm wrong. (I did not programming in C since 2 years)

You're not wrong. m_blockList is a pointer and OP needs to allocate an
s_blockHeader instance before he uses it:

s_blockHeader* m_blockList = cast(s_blockHeader*)malloc(s_blockHeader.sizeof);


More information about the Digitalmars-d-learn mailing list