【发布时间】:2011-07-16 11:26:54
【问题描述】:
假设我已将两个值传递给函数iCalculate(int x, int y),而此iCalculate 返回两个值。它们如下:-
(x*y)(x/y)
现在我应该如何用同一个函数同时返回以上两个值?
我的方法是:-
int* iCalculate(int x,int y){
int temp[2];
temp[0] = x*y;
temp[1] = x/y;
return temp;
}
【问题讨论】:
-
你有什么问题??