Сообщение Re[2]: как записать в массив char элемент размерности short от 02.12.2015 20:40
Изменено 02.12.2015 20:42 HAXT
C>Может все-так адрес взять элемента массива?
C>(unsigned short*)(& data[2]) = 65535;
(unsigned char*)(&data[2]) = 65535;
результат тот же самый
Error 1 error C2440: '=' : cannot convert from 'int' to 'unsigned char *'
2 IntelliSense: expression must be a modifiable lvalue
C>(unsigned short*)(& data[2]) = 65535;
(unsigned char*)(&data[2]) = 65535;
результат тот же самый
Error 1 error C2440: '=' : cannot convert from 'int' to 'unsigned char *'
2 IntelliSense: expression must be a modifiable lvalue
Re[2]: как записать в массив char элемент размерности short
C>Может все-так адрес взять элемента массива?
C>(unsigned short*)(& data[2]) = 65535;
(unsigned short*)(&data[2]) = 65535;
результат тот же самый
Error 1 error C2440: '=' : cannot convert from 'int' to 'unsigned short *'
2 IntelliSense: expression must be a modifiable lvalue
C>(unsigned short*)(& data[2]) = 65535;
(unsigned short*)(&data[2]) = 65535;
результат тот же самый
Error 1 error C2440: '=' : cannot convert from 'int' to 'unsigned short *'
2 IntelliSense: expression must be a modifiable lvalue