I'm doing an assignment for cs class but I'm having trouble with the logic?
Here is mine problem...Im reading a string to a function and returning an int, i have to do some calculations to the string and return it as an int but as a 5 digit int.Heres what i have so far..
int ZipCode::return_int_zip(string mystr)
{
int x=0,y=5;
int count=0;
int answer[5]={0,0,0,0,0};
cout<<"The Bar Code is: ";
for (int i=0; i<5; i++)
{
cout<<answer[i];
}
return count;
}
since i can't figure out a way to return it as int for now i return just an variable...none the less the assignment requires returning it as 5 digit int. any help
or hints would be greatly appreciated. Thanks