SHARE
TWEET

Untitled

a guest Mar 18th, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. #include <string>
  3.  
  4. // .h
  5.  
  6. class AlmaPrivate;
  7.  
  8. class Alma {
  9.  
  10. public:
  11.     void aaa();
  12.     void bbb(const std::string &s);
  13.     void bbb(int i);
  14.  
  15. private:
  16.     AlmaPrivate *d;
  17.  
  18. };
  19.  
  20. // .cpp
  21.  
  22. class AlmaPrivate {
  23.  
  24. private:
  25.     friend class Alma;
  26.  
  27.     std::string s1;
  28.     std::string s2;
  29.     int i2;
  30. };
  31.  
  32. void Alma::aaa() {}
  33.  
  34. void Alma::bbb(const std::string &s) {
  35.     d->s1 = s;
  36. }
  37.  
  38. void Alma::bbb(int i) {
  39.     d->i2 = i;
  40. }
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