我正在尝试调用一个我认为是函数ptr的函数?编译器给出错误:“,”令牌之前的预期“)”
static void map_start(struct map_reduce *mr){
map_fn(mr, mr->infile, mr->id , mr->threadNum);
}
static void reduce_start(struct map_reduce *mr){
reduce_fn(mr, mr->outfile,(mr->threadNum));
}
//map_fn and reduce_fn is defined as these
typedef int (*map_fn)(struct map_reduce *mr, int infd, int id, int nmaps);
typedef int (*reduce_fn)(struct map_reduce *mr, int outfd, int nmaps);
错误是:
mapreduce.c: In function ‘map_start’:
mapreduce.c:87: error: expected ‘)’ before ‘,’ token
mapreduce.c: In function ‘reduce_start’:
mapreduce.c:92: error: expected ‘)’ before ‘,’ token
make: *** [mapreduce.o] Error 1