jweinst1
8/22/2017 - 11:11 PM

sample class wrapped around string

sample class wrapped around string

#include <iostream>
#include <string>

class RadString
{
public:
  std::string value;
  RadString();
  
  std::string getString()
  {
    return value;
  }
  
  std::string&  getRef()
  {
    return value;
  }
  
  void setString(std::string& str)
  {
    value = str;
  }
  
  void operator += (std::string& str)
  {
    value += str;
  }
};

int main() {
  std::cout << "Hello World!\n";
}