title: Converting C++ builder 6 project to C++ builder 2010
body: <p>I have a simple project that's written in c++ builder 6. It's about encryption RSA algorithm.
  Wanted to convert to c++ builder 2010 but it gives errors</p>
  
  <p>e.g. source code of main project</p>
  
  <pre><code>//---------------------------------------------------------------------------
  
  #include &lt;vcl.h&gt;
  #pragma hdrstop
  
  #include "UTForm.h"
  #include "UTRSA.h"
  //---------------------------------------------------------------------------
  #pragma package(smart_init)
  #pragma resource "*.dfm"
  TForm1 *Form1;
  //---------------------------------------------------------------------------
  __fastcall TForm1::TForm1(TComponent* Owner)
          : TForm(Owner)
  {
  randomize();
  }
  //---------------------------------------------------------------------------
  void __fastcall TForm1::Button1Click(TObject *Sender)
  {
  TRSA a(Edit4-&gt;Text.ToInt());
  
  char* tmp = a.KeyModul;
  Edit1-&gt;Text = AnsiString(tmp);
  tmp = a.OpenKey;
  Edit2-&gt;Text = AnsiString(tmp);
  tmp = a.SecretKey;
  Edit3-&gt;Text = AnsiString(tmp);
  }
  //---------------------------------------------------------------------------
  void __fastcall TForm1::Button2Click(TObject *Sender)
  {
  TNumber n(Edit1-&gt;Text.c_str());
  TNumber e(Edit2-&gt;Text.c_str());
  TNumber d(Edit3-&gt;Text.c_str());
  
  THexString text;
  text.AsCharString = Edit5-&gt;Text;
  
  if (Edit3-&gt;Text != "")
    {
    TRSA a(n,e,d,Edit4-&gt;Text.ToInt());
    a.PlainText = text;
    Edit6-&gt;Text = a.CryptedText.AsHexString;
    }
  else
    {
    TRSA a(n,e,Edit4-&gt;Text.ToInt());
    a.PlainText = text;
    Edit6-&gt;Text = a.CryptedText.AsHexString;
    }
  }
  
  //---------------------------------------------------------------------------
  void __fastcall TForm1::Button4Click(TObject *Sender)
  {
  TNumber n(Edit1-&gt;Text.c_str());
  TNumber e(Edit2-&gt;Text.c_str());
  TNumber d(Edit3-&gt;Text.c_str());
  
  THexString text;
  text.AsHexString = Edit6-&gt;Text;
  
  if (Edit3-&gt;Text != "")
    {
    TRSA a(n,e,d,Edit4-&gt;Text.ToInt());
    a.CryptedText = text;
    Edit8-&gt;Text = a.PlainText.AsCharString;
    }
  else
    {
    TRSA a(n,e,Edit4-&gt;Text.ToInt());
    a.CryptedText = text;
    Edit8-&gt;Text = a.PlainText.AsCharString;
    }
  }
  //---------------------------------------------------------------------------
  </code></pre>
  
  <p>errors are: </p>
  
  <pre><code>Build
    Checking project dependencies...
    Compiling RSA.cbproj (Debug configuration)
    [BCC32 Warning] UTHexString.cpp(92): W8012 Comparing signed and unsigned values
    [BCC32 Warning] UTHexString.cpp(92): W8012 Comparing signed and unsigned values
    [BCC32 Warning] UTForm.cpp(29): W8057 Parameter 'Sender' is never used
    [BCC32 Error] UTForm.cpp(33): E2285 Could not find a match for 'TNumber::TNumber(wchar_t *)'
    [BCC32 Error] UTForm.cpp(34): E2285 Could not find a match for 'TNumber::TNumber(wchar_t *)'
    [BCC32 Error] UTForm.cpp(35): E2285 Could not find a match for 'TNumber::TNumber(wchar_t *)'
    [BCC32 Warning] UTForm.cpp(52): W8057 Parameter 'Sender' is never used
    [BCC32 Error] UTForm.cpp(57): E2285 Could not find a match for 'TNumber::TNumber(wchar_t *)'
    [BCC32 Error] UTForm.cpp(58): E2285 Could not find a match for 'TNumber::TNumber(wchar_t *)'
    [BCC32 Error] UTForm.cpp(59): E2285 Could not find a match for 'TNumber::TNumber(wchar_t *)'
    [BCC32 Warning] UTForm.cpp(76): W8057 Parameter 'Sender' is never used
    Failed
    Elapsed time: 00:00:01.5
  Project Import
    Upgrading project "D:\SOFTS\DELPHI and C++ Builder 2009\Cryptography\RSA\RSA\RSA.bpr"
      Reading "D:\SOFTS\DELPHI and C++ Builder 2009\Cryptography\RSA\RSA\RSA.bpr"
      Upgraded to "D:\SOFTS\DELPHI and C++ Builder 2009\Cryptography\RSA\RSA\RSA.cbproj"
  </code></pre>
  
  <p>I think C++ Builder 2010 has default unicode support that's why or I am wrong ?
  When I looked at the TNumber constructor it has the following:</p>
  
  <pre><code>//---------------------------------------------------------------------------
  #ifndef UTNumberH
  #define UTNumberH
  //---------------------------------------------------------------------------
  #include &lt;assert.h&gt;
  #include &lt;iostream.h&gt;
  #include &lt;iomanip.h&gt;
  #include &lt;string.h&gt;
  #include &lt;ctype.h&gt;
  #include &lt;limits.h&gt;
  #include &lt;math.h&gt;
  
  class TNumber
  {
  private:
         TNumber   multdigit(int) const;
         TNumber   mult10(int) const;
  
         char     *vlstr;                          
         int       vlen;                           
         int       vlsign;                         
  
  public:
  
                   TNumber(const char* = NULL);    
                   TNumber(int);                   
                   TNumber(const TNumber &amp;);       
                  ~TNumber();                      
  
                   operator int() const;
                   operator long() const;
                   operator double() const;
                   operator char*() const;
  
    const TNumber&amp; operator=(const TNumber&amp;);
  
       TNumber operator - () const;
       TNumber operator ++ ();
       TNumber operator ++ (int);
       TNumber operator -- ();
       TNumber operator -- (int);
  
           TNumber operator += (const TNumber &amp;);
       TNumber operator -= (const TNumber &amp;);
       TNumber operator *= (const TNumber &amp;);
       TNumber operator /= (const TNumber &amp;);
       TNumber operator %= (const TNumber &amp;);
  
    friend TNumber operator + (const TNumber &amp;, const TNumber &amp;);
    friend TNumber operator - (const TNumber &amp;, const TNumber &amp;);
    friend TNumber operator * (const TNumber &amp;, const TNumber &amp;);
    friend TNumber operator / (const TNumber &amp;, const TNumber &amp;);
    friend TNumber operator % (const TNumber &amp;, const TNumber &amp;);
  
    friend int     operator == (const TNumber &amp;, const TNumber &amp;);
    friend int     operator != (const TNumber &amp;, const TNumber &amp;);
    friend int     operator &lt; (const TNumber &amp;, const TNumber &amp;);
    friend int     operator &lt;= (const TNumber &amp;, const TNumber &amp;);
    friend int     operator &gt; (const TNumber &amp;, const TNumber &amp;);
    friend int     operator &gt;= (const TNumber &amp;, const TNumber &amp;);
  
           char*   strrev(char *s) const;
    friend TNumber abs(const TNumber &amp;);
    friend TNumber sqrt(const TNumber &amp;);
    friend TNumber pow(const TNumber &amp;, const TNumber &amp;);
    friend double  div(const TNumber &amp;, const TNumber &amp;);
  
    friend ostream &amp; operator &lt;&lt; (ostream &amp;, const TNumber &amp;);
    friend istream &amp; operator &gt;&gt; (istream &amp;, TNumber &amp;);
  
    friend TNumber rnd(const TNumber&amp; from, const TNumber&amp; to);
  };
  
  const TNumber zero = TNumber("0");
  const TNumber one  = TNumber("1");
  const TNumber two  = TNumber("2");
  
  TNumber eae(TNumber u, TNumber v);             
  
  #endif
  </code></pre>
  
  <p>Where am I wrong ?</p>
  
  <p>In addition find the c++ builder 6 project attached !</p>