Deleting all data in a struct array
Hello all,
im tryig to input a txt file, store it in an struct array, output that data into a .dat file and from then on the programm is to read from the .dat file, the thing is i no longer need the info stored in the struct.
a ROUGH example of my code is:
Code:
struct staff
{
char givenname[30];
char surname[30];
char title[5];
char position[30];
char department[10];
char roomnum[30];
char phonenum[4];
char username[30];
};
staff unistaff[300];
//inputs
//outputs etc etc
delete[] unistaff;
anyway comes up with the warning "[Warning] deleting array 'staff unistaff[300]'
ive tryed many variations of delete, such as:
delete unistaff
delete unistaff[300];
delete[] unistaff[300]
delete staff
etc.
any help appreciated