0
  • I have to type of very complex object A and B in 2 vectors:

    vector<A> va;
    vector<B> vb
    
  • I want to loop over va and vb, and store pairs in a C++ container:

    for(i:va)
      for(j:vb)
        container[i]=[j]
    
  • notice that the container can have several time the same "key" object.

  • I wanted to use a multimap but A and B are very complex compound data type and I do not want to slim information when setting the "key".
  • My final goal is to be able to access information for i and its corresponding j in the container.
  • Do you know which container is suitable for this task?
Lightness Races in Orbit
  • 378,754
  • 76
  • 643
  • 1,055
cabe
  • 115
  • 2
  • 8

0 Answers0