Struct Question

Hi I am kinda new to C++, and am still at the learning phase. Hope that I can get some guidance from you guys~

I'm kinda stuck with this:

struct database
{
char date[100];
int invoiceno[10];
float amount[10];
int no_of_invoice;
}day[10];

my question here is, why is the day[10] out of the curly brackets? What's the purpose of doing so? And do you have to end struct with a semicolon out of the curly brackets? thanks

The declartion you proveded is an abreviated form of:
1
2
3
4
5
6
7
8
9
struct database
{
  char date[100];
  int invoiceno[10];
  float amount[10];
  int no_of_invoice;
};

database day[10];
Topic archived. No new replies allowed.