fork download
  1. void DrawOnScreenRoutine ()
  2. {
  3. int xmax = ::GetSystemMetrics (SM_CXSCREEN) ;
  4. int ymax = ::GetSystemMetrics (SM_CYSCREEN) ;
  5.  
  6. HDC hdc = ::GetDC (nullptr) ;
  7.  
  8. while (1) {
  9. ::Rectangle (hdc, 0, 0, xmax, ymax) ;
  10. ::Sleep (500) ;
  11. }
  12.  
  13. ::ReleaseDC (nullptr, hdc) ;
  14. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘void DrawOnScreenRoutine()’:
prog.cpp:3:13: error: ‘::GetSystemMetrics’ has not been declared
  int xmax = ::GetSystemMetrics (SM_CXSCREEN) ;
             ^
prog.cpp:3:33: error: ‘SM_CXSCREEN’ was not declared in this scope
  int xmax = ::GetSystemMetrics (SM_CXSCREEN) ;
                                 ^
prog.cpp:4:13: error: ‘::GetSystemMetrics’ has not been declared
  int ymax = ::GetSystemMetrics (SM_CYSCREEN) ;
             ^
prog.cpp:4:33: error: ‘SM_CYSCREEN’ was not declared in this scope
  int ymax = ::GetSystemMetrics (SM_CYSCREEN) ;
                                 ^
prog.cpp:6:2: error: ‘HDC’ was not declared in this scope
  HDC hdc = ::GetDC (nullptr) ;
  ^
prog.cpp:6:6: error: expected ‘;’ before ‘hdc’
  HDC hdc = ::GetDC (nullptr) ;
      ^
prog.cpp:9:3: error: ‘::Rectangle’ has not been declared
   ::Rectangle (hdc, 0, 0, xmax, ymax) ;
   ^
prog.cpp:9:16: error: ‘hdc’ was not declared in this scope
   ::Rectangle (hdc, 0, 0, xmax, ymax) ;
                ^
prog.cpp:10:3: error: ‘::Sleep’ has not been declared
   ::Sleep (500) ;
   ^
prog.cpp:13:2: error: ‘::ReleaseDC’ has not been declared
  ::ReleaseDC (nullptr, hdc) ;
  ^
prog.cpp:13:24: error: ‘hdc’ was not declared in this scope
  ::ReleaseDC (nullptr, hdc) ;
                        ^
stdout
Standard output is empty