I am a bit perplexed about the way the way int is behaving in my code. I am trying to read integer data from an XML for further use. the code reads the tagged data properly but when I convert in any data(which I already know is an integer)into an int then the value reduces by one.Also this behaviour is exibited only for certain numbers like 255 or 65535.
Can anyone explain why and how this is happening.