すれ立てるまでもない質問はここで 第77刷
■ このスレッドは過去ログ倉庫に格納されています
0036デフォルトの名無しさん
2006/07/17(月) 00:53:12GLfloat yellow[] = { 0.8f, 0.8f, 0.2f, 1.0f }; //黄色を定義
GLfloat blue[] = { 0.2f, 0.2f, 0.8f, 1.0f }; //青を定義
GLfloat purple[] = { 0.8f, 0.2f, 0.8f, 1.0f }; //紫を定義
GLfloat red[] = { 0.8f, 0.2f, 0.2f, 1.0f }; //赤を定義
GLfloat green[] = { 0.2f, 0.8f, 0.2f, 1.0f }; //緑を定義
struct ball
{
GLfloat color[];
float rotate[3];
};
struct ball small[5];
small[0].color = yellow;
small[1].color = blue;
small[2].color = purple;
small[3].color = red;
small[4].color = green;
とやると、colorに代入したところで「左辺値が必要」とエラーが出ます。
構造体の使い方間違ってますか?
■ このスレッドは過去ログ倉庫に格納されています