Try With this:
int main ()
{
bool intEntered = false;
char input[255] ;
int number;
do{
cout<<"Input numbet: ";
cin >> input;
string s = input;
number = atoi(s.c_str());
if ( number == 0 )
cout << "Null is not alowed :) ";
else
intEntered = true;
}while(!intEntered);
}
Then use for loop to read from last digit. Voila!!!!