, 8);
printbits(res);
return 0;
}
/*Извлекает n бит начиная с позиции p*/
unsigned getbits(unsigned x, int p, int n){
return (x >> (p+1-n)) & ~(~0 << n);
}
unsigned int setbits(unsigned int x, int p, int n, unsigned int y){
unsigned int bit_field;
/*Извлечем n крайних правых битов аргумента y*/
bit_field = getbits(y, n, n);
return 0;
}
LCA4KTsKCXByaW50Yml0cyhyZXMpOwoJCiAJcmV0dXJuIDA7Cn0KCi8q0JjQt9Cy0LvQtdC60LDQtdGCIG4g0LHQuNGCINC90LDRh9C40L3QsNGPINGBINC/0L7Qt9C40YbQuNC4IHAqLwp1bnNpZ25lZCBnZXRiaXRzKHVuc2lnbmVkIHgsIGludCBwLCBpbnQgbil7CglyZXR1cm4gKHggPj4gKHArMS1uKSkgJiB+KH4wIDw8IG4pOwp9Cgp1bnNpZ25lZCBpbnQgc2V0Yml0cyh1bnNpZ25lZCBpbnQgeCwgaW50IHAsIGludCBuLCB1bnNpZ25lZCBpbnQgeSl7Cgl1bnNpZ25lZCBpbnQgYml0X2ZpZWxkOwoJCgkvKtCY0LfQstC70LXRh9C10LwgbiDQutGA0LDQudC90LjRhSDQv9GA0LDQstGL0YUg0LHQuNGC0L7QsiDQsNGA0LPRg9C80LXQvdGC0LAgeSovCgliaXRfZmllbGQgPSBnZXRiaXRzKHksIG4sIG4pOwoJCglyZXR1cm4gMDsKfQ==
prog.cpp:1:1: error: expected unqualified-id before ',' token
, 8);
^
prog.cpp:1:3: error: expected unqualified-id before numeric constant
, 8);
^
prog.cpp:2:11: error: expected constructor, destructor, or type conversion before '(' token
printbits(res);
^
prog.cpp:4:3: error: expected unqualified-id before 'return'
return 0;
^
prog.cpp:5:1: error: expected declaration before '}' token
}
^