Cマガを斬る!
■ このスレッドは過去ログ倉庫に格納されています
0469デフォルトの名無しさん
NGNGついでに言うと、構造体を初期化するときは、
構造体初期化関数を作成するのがセオリーです。
typedef struct {int i,j,k; char *l; char *m; int n,p,q,r,s,t,u,v; double w;} g_struc;
#if 0
void f()
{
g_struct theG;
...
theG.i = 1; theG.j = 23; theG.k = 456; theG.l = "abc"; theG.m = "def";
theG.n = 789; theG.p = 10; theG.q = 11; theG.r = 12; theG.s = 13;
theG.t = 14; theG.u = 15; theG.v = 16; theG.w = 17.0; g(&theG);
...
}
#else
void init_g_struc(int i,int j,int k,char *l,char *m, int n,int p,int q,int r,int s,int t,int u,int v,double w){...}
#endif
void g(g_struc *inS){...}
■ このスレッドは過去ログ倉庫に格納されています