Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <vector>
- struct Foo
- {
- double a, b, c, d;
- };
- std::vector<Foo> nodes;
- int left = 3;
- double run()
- {
- if (left == 0)
- return 1.0;
- left--;
- nodes.push_back(Foo());
- nodes[0].a = run();
- //double tmp = run();
- //nodes[0].a = tmp;
- return 1.0;
- }
- int main()
- {
- run();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement