>>642
こういうことか?

if( strcmp(argv[1], "test") == 0 )
 sum += test[i].a;
else if( strcmp(argv[1], "hoge") == 0 )
 sum += hoge[i].a;