English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories
0

I have a variable byteIncrement. I want to increase it by one for a loop so I have byteIncrement += 1. I keep getting an error that says I can not convert from int to byte. The data type byte stores an int from 0 - 255 though. Can someone give me some tips on how to fix this? I know I could just declare an integer, but since I don't need a number that big I just wanted to go with a byte.

2007-12-06 09:59:53 · 1 answers · asked by jhn_grz 3 in Computers & Internet Programming & Design

1 answers

Post your code.

byteIncrement += 1 is a valid statement and should work. The equivalent code is:
byteIncrement = byteIncrement + 1

2007-12-06 10:22:19 · answer #1 · answered by MarkG 7 · 0 0

fedest.com, questions and answers