Structures within structures for a database

This is a discussion on Structures within structures for a database within the C Programming forums, part of the General Programming Boards category; I'm trying to create a golf handicap management system that takes up to 100 rounds and their statistical info and ...

Structures within structures for a database

I'm trying to create a golf handicap management system that takes up to 100 rounds and their statistical info and relays it to one structure of a member....which holds their name, handicap, average putts, etc....

So, the dilemma is, structure for the user, and an array of 100 structures holding round by round information within the user's structure. I'm getting about 100 errors in my compiler and wonder if I'm off on the wrong foot completely.

Please let me know of any ideas you might have. I want to do this without linked lists if possible, as my instructor would prefer I do it this way for some reason. Here's the code........ (HELP!!)

Such assignments are illegal, you probably want to use the strcpy function instead.

#5.

Code:

fflush(stdin);

fflush is not for the standard input streams, this is undefined behavior. Check the FAQ.

#6. Don't use gets. Again, check the FAQ, fgets is a much better replacement.

#7.

Code:

printf("Please enter the name of the golf club: ");
gets(golfer1.(round[i]).club);
printf("\nPlease enter the slope of the course: ");
scanf("&#37;lf", &(golfer1.(round[i]).slope) );
printf("\nPlease enter the par of the course: ");
scanf("%d", &(golfer1.(round[i]).par));

You've got several places in your code, some noted above, with bad syntax. Get rid of the parenthesis in bold above as an example. Of course, you should have by this point also replaced "round" with whatever variable name you've created to fix #2 above. This issue is also a contributor to a large number of your errors.

"Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
-Christopher Hitchens

Is this someone else's code or just code you copied from somewhere?
Surely you should be able to correct the errors if you made the code yourself?
There are some very easy errors here that anyone should be able to correct.