#include <iostream>
using namespace std;
struct oad_struct
{
unsigned short oi;
unsigned char pty;
unsigned char id;
} ;
struct oad : oad_struct
{
oad( ) = default ;
oad( unsigned int x)
{
this- > oi = ( x >> 16 ) & 0xff ;
}
~oad( )
{
}
} ;
int main( ) {
// your code goes here
oad nOad( 0x00200200 ) ;
oad_strcut iOad, jOad;
iOad = jOad;
std:: cout << "oi = " << nOad.oi << std:: endl ;
return 0 ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKc3RydWN0IG9hZF9zdHJ1Y3QKewoJdW5zaWduZWQgc2hvcnQgb2k7Cgl1bnNpZ25lZCBjaGFyIHB0eTsKCXVuc2lnbmVkIGNoYXIgaWQ7Cn07CgoKc3RydWN0IG9hZCA6IG9hZF9zdHJ1Y3QKewoJb2FkKCkgPSBkZWZhdWx0OwoJb2FkKHVuc2lnbmVkIGludCB4KQoJewoJCXRoaXMtPm9pID0gKHggPj4gMTYpICYgMHhmZjsKCX0KCX5vYWQoKQoJewoJCQoJfQp9OwoKaW50IG1haW4oKSB7CgkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCglvYWQgbk9hZCgweDAwMjAwMjAwKTsKCW9hZF9zdHJjdXQgaU9hZCwgak9hZDsKCWlPYWQgPSBqT2FkOwoJc3RkOjpjb3V0IDw8ICJvaSA9ICIgPDwgbk9hZC5vaSA8PCBzdGQ6OmVuZGw7CglyZXR1cm4gMDsKfQ==
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:28:2: error: ‘oad_strcut’ was not declared in this scope
oad_strcut iOad, jOad;
^~~~~~~~~~
prog.cpp:29:2: error: ‘iOad’ was not declared in this scope
iOad = jOad;
^~~~
prog.cpp:29:9: error: ‘jOad’ was not declared in this scope
iOad = jOad;
^~~~
stdout