私は次のコードを持っています:
char *array1[3] =
{
"hello",
"world",
"there."
};
struct locator_t
{
char **t;
int len;
} locator[2] =
{
{
array1,
10
}
};
「gcc-Wall-ansi-pedantic」でOKにコンパイルされます。しかし、別のツールチェーン(Rowley)では、
warning: initialization from incompatible pointer type
char**tが存在する行。これは本当に違法なコードですか、それとも大丈夫ですか?
すべての答えをありがとう。私は今、自分の問題がどこにあったかを知っています。しかし、それは新しい疑問を提起します: