0
了解变量我需要一些帮助来理解与结构与结构C编程
一个typedef工作的怎样变量/*This is the Struct, with a new type Program*/
typedef struct prog{
char move[MAXNUMTOKENS][MAXTOKENSIZE];
int cm;
}Program;
Program prog; // new variable of type Program that has an array and an int
我的问题是什么呢这下一条语句做,它初始化在结构中int cm
为零?
prog.cm=0;
是的,这就是它是如何工作的。虽然我会称它为“分配”而不是“初始化”。 – cnicutar 2012-02-01 11:51:19