Кода работи и за VisualStudio6

Code:
#include <iostream.h>
#include <stdio.h>
#include <stdlib.h>
void main(){
unsigned int datefield;
unsigned int day, month, year;
cout<<"Day: ";
cin>>day;
cout<<"Month: ";
cin>>month;
cout<<"Year: ";
cin>>year;
datefield = day;
datefield = datefield+(month<<5);
datefield = datefield+(year<<9);
day=datefield&0x001F;
month=(datefield>>5)&0x000F;
year=(datefield>>9)&0x007F;

cout<<"datafield: "<<datefield;
cout<<"\n "<< day <<" "<<month<<" "<<year;
system("pause");
return;
}
Code:
Day: 17
Month: 2
Year: 2012
datefield: 16465
 17 2 2012
Press any key to continue . . .