(Sigh....)
I finished a program which runs fine on my XP box (Dev C++), but when I compile it under Linux (G++), I get:
In constructor 'Inventory::Inventory()'
ISO C++ forbids assignment of arrays
FYI:
.....Code:struct key //Private within class { char invnbr[16]; int recnbr; }; key *keyptr = new key;
Please tell me there is something short of re-writing my entire code to fix this. My program depends on that array for indexing of a file.Code:if (infile.is_open()) //Snippet of constructor { while (! infile.eof()) { infile.read ((char *) &data, sizeof(data)); keyptr[rrn].invnbr = data.inv_nbr; //This is the culprit! keyptr[rrn].recnbr = rrn; rrn++; } } infile.close();