linked list of structure
Sep 19, 2011 at 6:14pm UTC
The following is in the input file:
ucture.
Last edited on Sep 19, 2011 at 11:26pm UTC
Sep 19, 2011 at 6:19pm UTC
1) check if you reached eof
2) if not, read last name
3) read first name
4) read whatever the hell that is
5) put it into a node
6) append that node to the list
7) go back to 1
Sep 19, 2011 at 6:48pm UTC
. This is what I did.
[
I am not sure how to do that.
Last edited on Sep 19, 2011 at 11:26pm UTC
Sep 19, 2011 at 7:03pm UTC
First of all - is this a C or is this a C++ programming course? If it's C, alright, but if it's C++ don't use these C-ish functions.
You can define a struct like this:
1 2 3 4
typedef struct
{
Stuff name;
} StuffStruct;
- in C anyways, in C++ you'd drop the typedef and just write the name of the struct after "struct".
So now, what's your actual problem?
Topic archived. No new replies allowed.