Login Page - Create Account

Support Board


Date/Time: Sun, 05 May 2024 21:42:30 +0000



Post From: "For" Loop inside of a struct

[2015-11-06 20:37:57]
User126996 - Posts: 30
Need a clue why the following "for" loop will not work inside of my struct. It won't compile.

int CD_Status;
int MyArray[5];
int index;

struct s_PermData
{
for (index = 0; index < 5; index++){
MyArray[index] = CD_Status;
}
    
    
};

s_PermData* PermData;
PermData = (s_PermData*)sc.StorageBlock;


Any insight would be appreciated.