daily pastebin goal
60%
SHARE
TWEET

Untitled

a guest Jan 20th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class xyz {
  2. public:
  3.     static int abc();
  4. };
  5.    
  6. #include xyz.h
  7.  
  8. namespace xyz {
  9.  
  10. class qwe{
  11. public:
  12.     void bnm() {
  13.         int value = xyz::abc();
  14.  
  15.     }
  16. };
  17.  
  18. }
  19.    
  20. xyz       ab;   // The defn is ambiguous.
  21. class xyz ab;   // The ambiguity is resolved.
  22.    
  23. class xyz dummy;
  24. int value = dummy.abc();
  25.    
  26. namespace othername {
  27.    #include "xyz.h"
  28. }
  29.    
  30. othername::xyz::abc();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top