Adding arrays of integers in a node struct
Hi I am just wondering HOW TO INSERT AN ARRAY IN THIS node struct in C programming
---------------------------------------------------------------------------
typedef struct node *node_ptr ;
struct node
{
char *Deptname;
int Max_People;
int List_of_IDS[100];
node_ptr next;
};
This node struct adds the department name and then adds their IDs for future record?. I am just wondering how to add an array of List_of_IDs[100] for a particular department?.
Range of List_of_IDS[] is List_of_IDS[0] to List_of_IDS[Max_people-1] . Please this is urgent !!!!! Just give me a good reply. Thanks
Here is the detailed version
The character thing in the struct node is the part of the linked list, and in that same struct there is IDs array.
Now we have to search for that node in the linked list , and then add the integer in the IDs array.
Please reply ASAP
Thanks a lot
and then you have to add the array inside that found character
Thanks for such a quick reply ....
Then,
You have to insert the int ID inside the array in the same node??
So basically the program is like this ..
Enter the character name where you want to put you ID in:
You typed: abc
/* It searches for that name and asks you to enter an int ID */
This integer ID is stored in that array in that node where that character is....
Thanks again for a quick reply.. I am desperate at the moment. please reply
Cheers
This is the problem.... Sorry about before
Can you tell me how to add an array of numbers in this struct node?
typedef struct node *node_ptr;
struct node {
char *Dept_name;
int dept_IDS[1000];
node_ptr next;
}
So basically the program is like this ..
Enter the character name where you want to put you ID in:
You typed: abc
/* It searches for that name in the linked list (which is Dept_Name) and asks you to enter an int ID */
This integer ID is stored in that array in that node where that Dept_Name is....
How to add an integer inside the array of dept_IDS [] for a particular department name? And also we are working on a linked list
Please reply ASAP!!!!
Cheers