I am trying to modify a char * that i have in a struct by i am having some issues.
#define MAXLINELENGTH 1000
#define MAXINSTRUCTIONS 65536
struct labelMem {
char *name;
int pc;
};
struct labelStr {
struct labelMem labels[MAXINSTRUCTIONS];
};
while (func(string s) == 0) {
strncpy(programLabels.labels[labelCounter].name, label, MAXLINELENGTH);
labelCounter++;
}
I tried a few different ways of arranging my structs in an array but each time i have issues modifying my char * var.
Any ideas on how to fix this would be appreciated.