Hi all. Been a while since I've posted in here. I've been writing a large application in Java, only to find that it's impossible to continue in Java since it tries so hard to not allow you to access individual bytes, but the bossman wanted it in Java. So now I'm porting it over to C++, and I've run into a few difficulties, the first being with a structure.

Now, I should also explain that there's two distinct pieces of software here. One being an embedded group, and the other being a control station group. I'm writing for the control station group, and the embedded group has given me their code to speed up the switch to c++.

I have a class called kCom. This structure is defined in the header file:
Code:
struct timestamp{
	    unsigned int year:6;
	    unsigned int month:4;
        unsigned int day:5;
        unsigned int hour:5;
        unsigned int minute:6;
        unsigned int second:6;
    };
I've never seen syntax like that before (the year:6, month:4 thing). What's that accomplishing?

The second problem I'm facing is when I try to actually use the struct in another called startCom:
Code:
void startCom::runChoice(int choice)
{
    kCom bigK;
    bigK.timestamp Cal;
etc....
}
I get this error:
Code:
error: invalid use of 'struct kCom::timestamp'
error: expected ; before "Cal"
What's causing this? I've been away from c++ for a while, so it's taking me some time to get used to it again.
Thanks for any help you can give.