jewalky

Untitled

Mar 4th, 2017
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. class TestHandler : EventHandler
  2. {
  3.     int a; // play variable
  4.    
  5.     struct TestStruc
  6.     {
  7.         void DoSomething(TestHandler h)
  8.         {
  9.             h.a = 1; // allowed
  10.         }
  11.     }
  12.    
  13.     struct TestStruc2 clearscope
  14.     {
  15.         void DoSomething(TestHandler h)
  16.         {
  17.             h.a = 1; // not allowed
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment