i'm trying to determine the age of the people by entering their id card number..i'm trying to do this without having the database..
is this code possible??because i got error when try to run it..
if this possible,could you tell me the correct way to do this?
Thanks...
#include <iostream>
#include <string>
using namespace std;
int main()
{
int idnum,age,yearbirth;
cout << "enter id number: ";
cin >> idnum;
yearbirth=idnum.subint (0,2);
age=2009-yearbirth
cout << age;
}