我想尝试一下,但是我不知道在函数的输入参数中写什么。
void receiveCar(int value, ? Type2){
MPI_Status status;
cars = new car*[value]; //this is an array of Car (dyn. Allocated)
for (int i=0;i<value;i++) cars[i] = new car(0,0,0);
/* Here I want to receive the object BUT I need the datatype which is define elsewhere */
MPI_Recv(cars[1], 1, Type2, 0, 0, MPI_COMM_WORLD, &status);
for (int i=0;i<value;i++) delete cars[i];
delete [] cars;
}