title: Compiler cannot convert the arguments passed to swprintf function, winapi
body: <p>can you help me with this code? I cannot fix it. There is problem with swprintf function.</p>
  
  <pre><code>LRESULT CALLBACK DlgProc(HWND hWndDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
     {
          LPTSTR strPrincipal = new TCHAR[20],
                 strInterest = new TCHAR[20], strPeriods = new TCHAR[20],
                 strInterestEarned = new TCHAR[20], strAmountEarned = new TCHAR[20];
  
      double Principal, AnnualRate, InterestEarned;
          double FutureValue, RatePerPeriod;
          int    NumberOfPeriods, CompoundType;
          double i;
          int n;
  
      swprintf(strInterestEarned, "$%.2f", InterestEarned);
      swprintf(strAmountEarned,   "$%.2f", FutureValue);
     }
  </code></pre>
  
  <p>Here are errors:</p>
  
  <pre><code>Error   1   error C2665: 'swprintf' : none of the 2 overloads could convert all the argument types
  Error   2   error C2665: 'swprintf' : none of the 2 overloads could convert all the argument types
  </code></pre>