我想创建一个函数并返回两个整数:i和c。我怎样才能做到这一点? 预先感谢
a++ ;
if(i == 288){
a = 0 ;
i-- ;
b++ ;
c++ ;
}
if(c == 5000) {
i = 0 ;
c = 0 ;
}
if(a == 1 ){
P2OUT = 0xFF ;
a = 0 ;
}
if (b == 1){
P2OUT= 0x00 ;
b = 0 ;
}
答案 0 :(得分:2)
struct s1
{
int a;
int b;
/* more */
}
struct s1 foo(/* ... */)
{
struct s1 s;
s.a = /* something */;
s.b = /* something */;
/* more */
return s;
}
int foo1(int *a, int *b /*, .... */ )
{
*a = /* something */;
*b = /* something */;
return /* something */;
}