title: Is it possible add member function to data type in C++?
body: <p>I want to create a function to data types like in javascript with "String.prototype". Is it possible in C++ too?</p>
  
  <p>For example:</p>
  
  <pre><code>int functionName()
  {
      if(this.string == "something") {
          return 1;
      }
  
      return 0;
  }
  
  std::string mystring = "text";
  
  int result = mystring.functionName();
  
  </code></pre>