Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

error C2065: 'it' : undeclared identifier_

$
0
0

Hi

I am migrating my application from vc++6.0 to vc++2013, iam getting this undeclared error, I am sending the part of code

and iam higlighting the error line were these errors are repeating.

===================CODE=====================

 try
 {
  // Interpret all numbers in the string. The first occurence of a non
  // number character stops the loop.
  for (tstring::iterator it = szPacked.begin(); it != szPacked.end(); it++)
  {
   if (*it >= '0' && *it <= '9')
    dResult = dResult * 10 + (*it - '0');
   else
    break;
  }

  // If there is a non number character at the end, it is interpreted ...
  if ( it != szPacked.end())  //error
  {
   // Find the position in the translist string.
   tstring::size_type lPos = tstring(TRANSLIST).find(*it); //error
   if (lPos != tstring::npos)
   {
    // Put the last digit
    dResult = dResult * 10 + (DIGITLIST[lPos] - '0');

    // These positions mark a negative number
    if (lPos > 18 && lPos < 29)
     dResult *= -1;
   }
   else
    return this->Error(IDS_ERR_NUMBER, IID_ICOLAStrings, E_FAIL);

   // Find out, if threre are following numbers or letters. This
   // causes an error.
   for (it++; it != szPacked.end(); it++)  //error
   {
    if (*it != ' ') //error
     break;
   }
   if (it != szPacked.end()) //error
    return this->Error(IDS_ERR_NUMBER, IID_ICOLAStrings, E_FAIL);
  }

==============================CODE===============================

Please help me get through this

Thanks Ankush


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>