Hello,
I have such a line:
Code:
mapa[i][j] == '1' ? dist[i][j] = 0, Q.push(p(make_pair(i,j), make_pair(i,j))) : dist[i][j] = 0x7fffffff ;
but it doesn't really work, I got an error:
error: `((void)(dist[i][j] <unknown operator> 0), (&Q)->std::queue<_Tp, _Sequence>:ush [with _Tp = p, _Sequence = std::deque<p, std::allocator<p> >](((const p&)((const p*)(&p(std::make_pair [with _T1 = int, _T2 = int](i, j), std::make_pair [with _T1 = int, _T2 = int](i, j)))))))' has type `void' and is not a throw-expression
Can anyone tell me why it doesn't work ?
This part of code which do the same works fine:
Code:
dist[i][j] = 0x7fffffff;
if(mapa[i][j] == '1')
{
        dist[i][j] = 0;
        Q.push(p(make_pair(i,j), make_pair(i,j)));
}
Regards,
apacz