:: reverse dictionary ::
※ソースファイルについて
文字列をコピーするには、strcpy 関数を使います。
#include <string.h>
char str[16]; char copy[] = "Cプログラム"; strcpy(str, copy);
str は "Cプログラム" になります。
ワイド文字列の場合は wcscpy 関数を使います。
#include <locale.h> #include <string.h>
wchar_t str[16]; wchar_t copy[] = L"Cプログラム"; setlocale(LC_ALL, "ja"); /* ロケールを日本語に設定 */ wcscpy(str, copy);
str は "Cプログラム" になります。
char *strcpy(char *s, const char *sc) wchar_t *wcscpy(wchar_t *s, const wchar_t *sc)
文字列バッファ s に文字列 sc をコピーします。
s … 文字列バッファ
sc … コピーする文字列
文字列 sc をコピーした文字列バッファ s へのポインタ
Copyright (C) 2005-2007 Noto Watabe. All rights reserved.
e-mail:wmh@always-pg.com