So i have this queue
deque<int> deq1(2,10);
I Have accessed the element using 2 way and both of them return the same value
cout<<deq1[0];
cout<<deq1.at(0);
why did them make a special function to do the same thing or is one way better than the other?