python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
I don't understand why I get the compiler error "Lossy conversion from int to short"
For this code:
public class Solution{
public static void main(String[] args){
short x = 10;
x = x * 5;
System.out.print(x);
...
futuredeveloper
Votes: 0
Answers: 1
QT String to short int - Hex Value
I want to convert QString to short int. For eg,
Input:
QString str = "0x0001";
Output:
short int num = 0x0001;
I have tried toShort() method of QString but it converts "0x0024" to ...
Akshay Shelke
Votes: 0
Answers: 1
QByteArray to short Int array in QT C++
I am receiving a QByteArray from UDP Socket. The QByteArray is of 52 elements each containing values from 0 to 9 - A to F. Now, I want to convert this QByteArray into a short int array of 13 elements ...
Soham Patel
Votes: 0
Answers: 1
Issues converting Hex to Short getting the wrong value
I have a function that converts 2 char values into an unsigned short:
unsigned short ToShort(char v1, char v2) {
unsigned short s = ((v1 << 8) | v2);
return s;
}
It works most of the ti...
Justin Barren
Votes: 0
Answers: 1