Advertisement
fastman92

if (this->m_carArray[i] == -1) will never be true.

Nov 20th, 2014
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. // Win32Project1.cpp : Defines the entry point for the console application.
  2. //
  3.  
  4. #include "stdafx.h"
  5.  
  6. class __declspec(dllexport) CLoadedCarGroup // size varies.
  7. {
  8. public:
  9.     unsigned __int16 m_carArray[];
  10.  
  11.     // Counts members
  12.     int __thiscall CountMembers()
  13.     {
  14.         unsigned int i = 0;
  15.  
  16.         do
  17.         {
  18.             if (this->m_carArray[i] == -1)
  19.                 break;
  20.  
  21.             i++;
  22.         } while (i < 23);
  23.  
  24.         return i;
  25.     }
  26. };
  27.  
  28.  
  29. int main(int argc, char* argv[])
  30. {
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement