Queue using stacks

code : https://ide.codingblocks.com/s/224182

  1. why we are declaring stack s1 and s2 in private? and other functions in public

  2. in line no. 25 why exit(0) is used instead of return -1… what is the diff btw it

@chaman9 hey bro,
We are making s1 and s2 private as we dont want any other class to access these members and make change changes in them.
In line 25 we can use both exit or return ,as return is use to return to the point where function is called whereas exit will terminate the programme.
Hope you get it.

thanks a lot for clearing this

@chaman9 no problem bro.