> check(triplet, ofstream file);

You don't specify the arguments type when calling the function. check(triplet, file);