Update Array from a get call

My main code is:

1
2
vectD3.front() = '{';
vectD3.back() = '}';


I need to write code to make that above code change the array from

[A, B, C, D, E, F, G, H, I, J, K, ..., Z]

to

{B, C, D, E, F, G, H, I, J, K}

here are the front and back methods

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
   public:T front()
   {
      if(currentSize > 0)
      {
         return at(0);
      }
      else
      {
         throw std::runtime_error("dynarray has no members");   
      }
   }
   public:int back()
   {
      if(currentSize > 0)
      {
         return at(currentSize - 1);
      }
      else
      {
         throw std::runtime_error("dynarray has no members");
      }
   }
T& front()
return a reference so you may modify the element.
Topic archived. No new replies allowed.