vaibhava96 vaibhava96 - 1 year ago 72
C++ Question

looping through a deque recursively c++

I am trying to create a function that takes in a deque of integers as a parameter, loops through each element one by one, and returns the deque recursively. I have found a few previous posts on StackOverflow that do something similar, but I am unable to understand what is happening in their answers. I am relatively new to C++. Help is greatly appreciated.

Answer Source

it should be something like this

deque <int> x;
void Calc (deque <int> d){
    if (d.empty()) return;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download