I need some clarification about this issue. I have a class called con.
readIndex = 0;
con = new con();
*readIndex = 0;
It should definitely initialize readIndex to 0. Just put one print statement and check whether your constructor called properly or not.
Also try with