• MorphOS Developer
    itix
    Posts: 1516 from 2003/2/24
    From: Finland
    Quote:


    I give up... How does a C program read and write to allocated memory?



    struct Something
    {
    ULONG foo;
    ULONG bar;
    };

    struct Something *s = AllocMem(sizeof(*s), MEMF_ANY);

    if (s) s->foo = 1;

    You can also define it as an array (a byte array for example).
    1 + 1 = 3 with very large values of 1
  • »22.02.11 - 06:57
    Profile