Convertir un ou plusieurs caractères en des caractères ‘multibyte’

Author:


{filelink=13226}


  #include 
  #include 
  #include 

  int main(void)
  {

	  wchar_t fmt_cmp[128] = { L'' };
	  wchar_t prefix[32]  = L"-";
      wchar_t suffix[32]  = L"";
     wchar_t number[128] = L"123.456,78";
     char output_cmp[256];

     wcscpy( fmt_cmp, prefix );
     wcscat( fmt_cmp, number );
     wcscat( fmt_cmp, suffix );

    if ( -1 != wcstombs( output_cmp, fmt_cmp, 256 ))
	{
    printf( "Résultat: %sn", output_cmp );
	}

    return 0;
  }

Leave a Reply

Your email address will not be published. Required fields are marked *

Convertir un ou plusieurs caractères en des caractères ‘multibyte’

Author:


{filelink=13226}


  #include 
  #include 
  #include 

  int main(void)
  {

	  wchar_t fmt_cmp[128] = { L'' };
	  wchar_t prefix[32]  = L"-";
      wchar_t suffix[32]  = L"";
     wchar_t number[128] = L"123.456,78";
     char output_cmp[256];

     wcscpy( fmt_cmp, prefix );
     wcscat( fmt_cmp, number );
     wcscat( fmt_cmp, suffix );

    if ( -1 != wcstombs( output_cmp, fmt_cmp, 256 ))
	{
    printf( "Résultat: %sn", output_cmp );
	}

    return 0;
  }

Leave a Reply

Your email address will not be published. Required fields are marked *