You’ll get a divide by zero error if u <= 0
in:
vidmerginu = ms / m;
because m
is set to 0
and not incremented.
And a divide by zero error if u >= 0
in:
vidvaikinu = fabs(vs / v);
because v
is set to 0
and not incremented.
solved C++ “Program.exe has stopped working” [closed]