How would i merge images to make 1 longer image comprised of the 2

As the image shows, 2 image files will be taken as input and out comes 1 new image file tiled like that

cv::hconcat