Hello,
well this portion of code is basically just the structures from the program. everytime i compile the program i get an error at the INFOstructure.
i am using these structure in a program that read from a file and prints the data to the screen. my problem is that for some reason my structures are wrong.
thanks in advance for helping,
David

#include <stdio.h>
#include <string.h>
 
#define STR_SIZE 25
#define ARR_SIZE 10
#define MAX 15

typedef struct
{
  char month [MAX];
  int day;
  int year;
}DATE;

typedef struct  //this is the structure that is giving me problems.  for some reason the 
{                   // its  keeps saying no semicolon or union after struct.
  char firstname[MAX];
  char lastname[MAX];   
  DATE birthday;
  SSN social[9];
  GRADE stugrade;
}INFO;  
   
typedef struct
{
  char social;
}SSN;
   
typedef struct
{
  int grade;
}GRADE;
Ancient Dragon commented: Thanks for using code tags correctly +21

The problem is that SSN and GRADE have not been declared yet. To fix move lines 24 thru 32 up to just under line 13.

thanks haha.
i was just reading the section in my book and its told me exactly what you said.
that the structure have to be initialized in a certain order

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.