2008-08-20 C言語のchar配列の初期化 C/C++ memsetが普通のやり方 char str[512]; memset(str, '\0', sizeof(str)); 一行でも記述可能 char str[512] = {0};