title: Possible to convert C# get,set code to C++
body: <p>I have the following code in C#:</p>
  
  <pre><code>public string Temp
          {
              get { return sTemp; }
              set { 
                  sTemp = value;
                  this.ComputeTemp();
              }
          }
  </code></pre>
  
  <p>Is it possible to convert this and use the get and set this way? I know that you cannot declare like so and I need the ":" to declare but when I try to do this:</p>
  
  <pre><code>public:
          std::string Temp
          {
          get { return sTemp; }
          set { 
                  sTemp = value;
                  this.ComputeTemp();
              }
  </code></pre>
  
  <p>The error I receive is on the first "{" stating <code>expected a ';'</code>. Any suggestions on how to fix it?</p>