title: how to print out values from vector under a struct
body: <p>in my code i am unable to print out the value assigned into the vector.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;algorithm&gt;
  #include &lt;string&gt;
  #include &lt;iomanip&gt;
  #include &lt;limits&gt;
  #include &lt;stdio.h&gt;
  #include &lt;sstream&gt;
  #include &lt;vector&gt;
  
  
  using namespace std;
  using std::stringstream;
  
  
  
  string pMem, comment, sGen, val,input,id,size,inits,incs;
  
  double pmemSize =0;
  
  char t[10], m[256],init[10],inc[10];
  
  
  struct rootset {
    double totSize;
    double *rStrtPtr;
    double *rEndPtr;
    vector&lt;double&gt; physicalM; /* This is the size of physical memory i need to assign*/
  
    struct generations {
      double totSize;
      const char *genStrtPtr;
      const char *genEndPtr; 
      int numOfGen;
      string genName;
  
      struct object {
        double objSize;
        const char *objStrtPtr;
        const char *objEndPtr;
        string id;
        char markBit;
        char objPtr;
      };
  
      struct freeList {
        double freeSpace;
        int flNumb; 
      };
    };
  };
  int main()
  {
    int pmemSize;
    cout&lt;&lt;" ENter the size "&lt;&lt;endl;
    cin &gt;&gt; pmemSize;
    vector&lt;rootset&gt; pRootSet;
    pRootSet.push_back(rootset());
    pRootSet[0].totSize = pmemSize;
    pRootSet[0].physicalM.reserve(pmemSize);
  
     for (int s=0; s&lt;pmemSize; ++s)
        pRootSet[0].physicalM[0] =s;
  
    vector&lt;double&gt;::iterator it;
  
    for(it = pRootSet[0].physicalM.begin(); it!= pRootSet[0].physicalM.end(); ++it) 
        cout &lt;&lt;"Printing it: " &lt;&lt;(*it)&lt;&lt;endl;
  }
  </code></pre>
  
  <p>I basically need to assign some space in the physical memory provided by the user. I thought i'd use vectors. But i am unable to print the values i enter into the physicalM.</p>