I don't know if I'm missing the boat, but this keeps giving me an error, and I'm not even to the 'hard' part of my homework. Actually, I don't get an error when I compile and run the program, but it generates an error in my computer and pulls up the windows error window.
The whole part of the homework is to create a linked list, print it, and then add a value to it, and print again. I can't seem to get the linked list part correct...what exactly am I doing wrong?
Code:
#include <stdio.h>
#define AMOUNT 5
struct linkedlist
{
int value;
};
struct linkedlist value[5];
int main()
{
int i;
printf("Enter five numbers\n");
for(i = 0; i < AMOUNT; i++)
scanf("%d", value[i]);
printf("you have entered the following numbers:");
for(i = 0; i < AMOUNT; i++)
printf("%d\n", value[i]);
}