Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement