Hi, I am looking to be able to put some validation on the entering of my data on the 'data' entry on my structure 'packet'.
Basically it can only be 50 characters long and only have number inputs.
struct packet{ // declare structure for packet creation
int source;
int destination;
int type;
int port;
char data[50];
};
struct packet list[50]; //Array for structure input & initiate structure
printf("\nEnter up to 50 numeric characters of data.\n");
scanf("%s", list[x].data);
All help is useful and I thank you in advance.