I have a series of row vectors, each of which contains dates. As a simple example, a vector A of size 2 may contain:
A[0] = "01-Jul-2010";
A[1] = "03-Jul-2010";
while the second vector B of size 3 may contain:
B[0] = "02-Jul-2010";
B[1] = "03-Jul-2010";
B[2] = "04-Jul-2010";
I would like to create a vector C that contains the "union" of the element in A and B:
C[0] = "01-Jul-2010";
C[1] = "02-Jul-2010";
C[2] = "03-Jul-2010";
C[3] = "04-Jul-2010";
When combining A and B, I don't want any duplicate dates, so each C element must be unique. Is there a built-in / stl function (or Boost library) that I can name will do this?
Thank!
source
share