Advertisement
tinyevil

Untitled

Dec 27th, 2018
343
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.18 KB | None | 0 0
  1. enum Foo{
  2.     Bar(int x, char c);
  3.     Baz(int* x, int a, short p);
  4. }
  5.  
  6. void f(Foo* foo){
  7.     if (foo is Bar){
  8.         g(foo as Bar);
  9.     }
  10. }
  11.  
  12. void g(Bar* bar){
  13.     bar->x = 10;
  14.     bar->c = 'x';
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement