x = 1, y = 2; fmax(x , y); //if you want to print it right away: cout << fmax(x , y); //if you want to store it: int j = fmax(x, y); cout << j; //output 2