Instead of printing result[0],result[1],result[2],first check the size of vector result and if it is ‘0’ then return 0 or whatever is given and otherwise return result vector.
solved Core dumped while using vector
Instead of printing result[0],result[1],result[2],first check the size of vector result and if it is ‘0’ then return 0 or whatever is given and otherwise return result vector.
solved Core dumped while using vector