Substitute for read-only constant array?

Hi - I have the following array setup with multiple variable types:

struct Blocks
{
    int blNum;
    int blStatus;
    long blWinds;
    int blRPM;
    int blAccel;
    int blAreaL;
    int blAreaR;
    int blScatter;
    int blWPS;
    float ptArea;
    float ptInterval;
    int ptSpeed;
} const BlockTable[] =
{
{1, 1, 10, 40, 3000, 0, 100, 0, 0, 0, 0, 0},
{2, 1, 0, 0, 6000, 0, 100, 0, 0, 0, 0, 0},
{3, 0, 0, 4, 4000, 0, 100, 0, 0, 0, 0, 0},
{4, 1, 0, 0, 4000, 0, 100, 0, 0, 0, 0, 0},
{5, 0, 0, 0, 4000, 0, 100, 0, 0, 0, 0, 0},
};

However, when I want to change an item in one of these arrays, like this:

BlockTable[i].blStatus = BlockTable[ix].blStatus;

Arduino's error message makes it clear that a const array is read-only. Is there a suitable array type that I can switch in without having to alter the way everything is arranged?

Why is it const?

Because I suck and I learned how to make the table from someone else that made it that way.

Then just remove the const keyword.

You are my new god.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.