I'm programming a Hokuyo laser range finder in C++. When the range finder is not plugged in the following code works fine, but when I plug in the range finder the code assigns startIndex the largest possible int value.Not sure exactly what is happening. any help would very appreciated. Thanks in advance.