All,
I'm getting kind of annoyed with this. I'm trying to convert an 8 digit string into a long. The code compiles, but I'm getting only 1 digit placed into the long.
I want the whole thing, can anyone tell me what I doing wrong?
Code:
string strSubTmp = strCheck.substr(4,8);
cout << "Time as string: " << strSubTmp << endl;
istringstream isTmp(strSubTmp,istringstream::in);
long lTmpTime;
isTmp >> lTmpTime;
cout << "lTmpTime=" << lTmpTime << endl;