【发布时间】:2014-06-04 03:27:51
【问题描述】:
我有一个返回我定义的结构类型的函数:
typedef struct irPulseSet
{
int pulseCount;
int (*pulses)[2];
} irPulseSet;
irPulseSet irReadPulse()
{
irPulseSet outputPulseSet;
//some stuff
return outputPulseSet;
}
但我在循环中调用它:
while(1)
{
irPulseSet currentlPulseSet = irReadPulse();
//some other stuff here
}
我想知道如何取消设置currentPulseSet,以便在下一次while循环迭代中再次设置。
【问题讨论】: