title: proper syntax for using a vector inside a class
body: <pre><code>class Code
  {
  public:
    Code();
    //string decode(vector&lt; string&gt; message);
  private:
    //vector&lt;string&gt; codewords;
    //vector&lt;char&gt; alpha;
    char vector&lt;char&gt;  alphacode();
    string vector&lt;string&gt;  morsecode();
    //char decode(string c);
  
  };
  
  Code::Code()
  {
  
  }
  
  string Code::vector&lt;string&gt; morsecode()
  {
   vector&lt;string&gt; temp(28);
   temp[0] =".-";
   temp[1] ="-...";
   temp[2] ="-.-.";
   temp[3] ="-..";
   temp[4] =".";
   temp[5] ="..-.";
   temp[6] ="--.";
   temp[7] ="....";
   temp[8] ="..";
   temp[9] =".---";
   temp[10] ="-.-";
   temp[11] =".-..";
   temp[12] ="--";
   temp[13] ="-.";
   temp[14] ="---";
   temp[15] =".--.";
   temp[16] ="--.--";
   temp[17] =".-.";
   temp[18] ="...";
   temp[19] ="-";
   temp[20] ="..-";
   temp[21] ="...-";
   temp[22] =".--";
   temp[23] ="-..-";
   temp[24] ="-.--";
   temp[25] ="--..";
   temp[26] =".......";
   temp[27] ="x";
   return temp;
  }
  
  char Code::vector&lt;char&gt; alphacode()
  {
   vector&lt;char&gt; temp;
   for (char c='A'; c&lt;='Z'; c++)
        temp.push_back(c);
   temp.push_back(' ');
   temp.push_back('.');
   return temp;
  }
  
  int main()
  {
  
  return 0;
  }
  </code></pre>
  
  <p>This is the code I have so far but I don't know if the syntax for my vector classes is correct.  Also how would I go about accessing the vectors inside the int main() portion of my code.  Sorry first quarter of c++ still very new to all this.</p>