P
Pushkar Pradhan
I need to pass the STL linked list to a function, this function should
modify the linked list. So do I need to pass it by address, this is how
I do it:
void qhull(PARTICLE S[], int len, list<PARTICLE> &hull,
list<PARTICLE>::iterator
&iter1,
list<PARTICLE>::iterator &iter2, PARTICLE a, PARTICLE b,
int rank, int numtasks)
I think that's working but I have another problem: I need to pass two
iterators also to this function which point to certain position in the
list, should these iterators be passed by reference. The above syntax
gives me syntax errors:
This is the call from main:
qhull(S1, index1, hull, hull.begin(), hull.end(), globalMin,
globalMax, rank,
numtasks);
Pushkar Pradhan
modify the linked list. So do I need to pass it by address, this is how
I do it:
void qhull(PARTICLE S[], int len, list<PARTICLE> &hull,
list<PARTICLE>::iterator
&iter1,
list<PARTICLE>::iterator &iter2, PARTICLE a, PARTICLE b,
int rank, int numtasks)
I think that's working but I have another problem: I need to pass two
iterators also to this function which point to certain position in the
list, should these iterators be passed by reference. The above syntax
gives me syntax errors:
This is the call from main:
qhull(S1, index1, hull, hull.begin(), hull.end(), globalMin,
globalMax, rank,
numtasks);
Pushkar Pradhan