
04-13-2009
|
|
Moderator
|
|
|
Join Date: Dec 2008
Location: .at
Posts: 1,939
|
|
Quote:
Originally Posted by rickym2626
[...]
keep a count field in each record (as you did in p5).
once the list is complete, ask the user to see if an element
is on the list--read her/his input from the keyboard.
|
Homework?
Quote:
Originally Posted by rickym2626
here is what i got
Code:
#include "ll.h"
#include <stdio.h>
int main()
{
int info;
lnode *head;
head = getlist();
if (find(10, head))
fprintf("%d is on the list\n", 10);
else
fprintf("%d is not on the list\n", 10);
if (find(178, head))
fprintf("%d is on the list\n", 178);
printlist(head);
return 0;
}
I also have a ll.h, a makefile and an input file. But I'm just not understanding the program and how to start it.
|
Did you compile it? Does it have execute permissions (if needed)? What exactly aren't you understanding? Where did you get that code from?
|