Gast
#830899
Hi Leute, ich habe ein Problem, welches ich nicht bearbeiten konnte. Ich will 2 short Variablen in einen Int-Bereich packen (packing&unpacking): 2x2Bytes -> 4 Bytes. Ich habe folgendes probiert: short s1,s2; int temp; temp &= 0x0000; //clear bits fscanf(file,"%d",&s1); //read input1: temp = s1<<16; fscanf(file,"%d",&s2); //read input2: temp = temp | s2; Kann mir jemand sagen, was daran falsch ist?