title: Delphi Templates like C++?
body: <p>Please, can anyone convert this code for me?</p>
  
  <p>I don't know so much about C++, so I need to convert this code from C++ to delphi:</p>
  
  <pre><code>template &lt;typename DestType, typename SrcType&gt;
  DestType* ByteOffset(SrcType* ptr, ptrdiff_t offset)
  {
          return reinterpret_cast&lt;DestType*&gt;(reinterpret_cast&lt;unsigned char*&gt;(ptr) + offset);
  }
  </code></pre>
  
  <p>Thank you...</p>