fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct oad_struct
  5. {
  6. unsigned short oi;
  7. unsigned char pty;
  8. unsigned char id;
  9. };
  10.  
  11.  
  12. struct oad : oad_struct
  13. {
  14. oad() = default;
  15. oad(unsigned int x)
  16. {
  17. this->oi = (x >> 16) & 0xff;
  18. }
  19. ~oad()
  20. {
  21.  
  22. }
  23. };
  24.  
  25. int main() {
  26. // your code goes here
  27. oad nOad(0x00200200);
  28. oad_strcut iOad, jOad;
  29. iOad = jOad;
  30. std::cout << "oi = " << nOad.oi << std::endl;
  31. return 0;
  32. }
Compilation error #stdin compilation error #stdout 0s 16048KB
stdin
Standard input is empty
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
Standard output is empty