daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest Oct 11th, 2018 68 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Strings
  2. {
  3.     std::string d_emptyString;
  4.  
  5.     std::string *d_str;
  6.  
  7.     ...
  8.  
  9.     private:
  10.         std::string &stringAt(size_t const idx) const;
  11. }
  12.  
  13. // ---------------------------------------------------- //
  14.  
  15. std::string &Strings::stringAt(size_t const idx) const
  16. {
  17.     if(idx < d_size)
  18.         return d_str[idx];
  19.     else
  20.         return d_emptyString;
  21. }
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