   C++ console programming using cbuilder4
  I have a problem with C++ console programming using cbuilde4.I input data through overloaded operators of istream and write to a file through ofstream. Its working alright without validations.I have a problem of how to validate inputs of numeric fields and get back to the istream and write to the file.See below a part of code where I have tried this and relavent coding.If any body can help on this thats great.Thanks in advance.istream& operator>> (istream& instr, const Details& details){details.inputData(instr); }stream& Details::inputData(istream& instr){int keyval=0;cout << "ID Number : " << idNumber<<endl;cout << "Name : ";instr.ignore();instr.getline(name,19);cout << "Address1 : ";instr.getline(address1,19);cout << "Address2 : ";instr.getline(address2,19);char *inputString;cout << "Postal Code : ";//validate numeric field postalCode ***************?????for (int i=0; i<8;i++){keyval = getch();if (keyval==13){ i=8;}cout<<(char)keyval;if(isdigit(keyval)){inputString==(char)keyval;}}*inputString >> postalCode ; //????problem is herecout <<endl<< "City : ";instr.ignore();instr.getline(city,19);cout << "Fax No : ";instr >> fax ;instr.ignore();return instr;}