Project Euler #11 - Largest product in a grid C++
Input

Using magic numbers like 48 and -16 makes your code very cryptic and hard to understand. Consider comparing with the characters instead.

Algorithm / Logic

I think two things that could really simplify your code are:


Limit the loops iterations from [0, 0] to [16, 16]. This will make you avoid some unnecessary checks.
Only try to get the 4 numbers in the forward direction. There is no need to check in the backward direction as well since it's already checked in the forward direction.