次の例では、CChar関数を使用して、String式の最初の文字をChar型に変換しています。 VB DimaStringAsStringDimaCharAsChar' CChar converts only the first character of the string.aString ="BCD"' The following line of code sets aChar to "B".aChar =CChar(aString) ...
strcpy_s(または Unicode/MBCS との移植性がある_tcscpy_s) に対する 3 つ目の引数には、const wchar_t*(Unicode) またはconst char*(ANSI) のいずれかを指定します。 前述の例では、この引数にCStringを渡しています。 C++ コンパイラはCStringクラス用に定義されている変換関数...