0

can we declare vector with a struct inside this struct?

    struct foo {
       int a;
       vector<foo>;
    }

Or is there any work around for this?

Mazer
  • 11
  • 2
  • Need to vector v; You need to have variable name. – Ritesh Oct 04 '15 at 16:41
  • For a work-around have a look at [boost containers of incomplete types](http://www.boost.org/doc/libs/1_59_0/doc/html/container/main_features.html#container.main_features.containers_of_incomplete_types). – juanchopanza Oct 04 '15 at 17:02

0 Answers0