e**c 发帖数: 95 | | R***n 发帖数: 680 | | t****t 发帖数: 387 | | f*********5 发帖数: 576 | 4 use them as parameter.
for example,you want to modify a linked list and return the
result head and its length.
======================================
void GetListLen(struct node ** head,int &len)
{
...
*head=***;
*len=*;
return;
}
struct node * list;
int lenth;
GetListLen(&list,lenth);
//you can use list and length here.
【在 e**c 的大作中提到】 : a little confusing now.
| f********i 发帖数: 563 | 5 我一般写成如下样子:
bool foo( int *input_data1, int *input_data2, const int para1, const int
para2, int &output_data1, int &output_data2)
{
if(!succeed)
{
return false;
}
return true;
} |
|