【初心者歓迎】C/C++室 Ver.10【環境依存OK】
■ このスレッドは過去ログ倉庫に格納されています
0048デフォルトの名無しさん
NGNG漏れならこう書く
#include <stdio.h>
struct teststruct
{
int x,y,z;
};
void func(struct teststruct* pTest);
int main()
{
struct teststruct test[8];
func(test);
printf("%d\n" , test[0].x);
printf("%d\n" , test[1].x);
printf("%d\n" , test[2].x);
}
void func(struct teststruct* pTest)
{
pTest[0].x=7;
pTest[1].x=1;
pTest[2].x=3;
}
■ このスレッドは過去ログ倉庫に格納されています