Created
June 23, 2020 19:22
-
-
Save gattonero1052/d896dc47dba5be84b70d896a1c4be4c3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <string> | |
#include <vector> | |
using namespace::std; | |
class B{ | |
}; | |
class A{ | |
public: | |
int x; | |
B &b; | |
A(int x,B &b):x{x},b{b}{} | |
}; | |
int main() | |
{ | |
B b; | |
A a1{1,b}, a2{2,b}; | |
vector<A> va, vb; | |
va.push_back(a1); | |
vb.push_back(a2); | |
va.insert(std::end(va), std::begin(vb), std::end(vb)); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment