Why i am getting segmentation fault in the code?

at line no 18
correct condition is
if(min_stack.size())
you are checking whether stack contain something or not
if size is 0 then condition is false
else condition is true