title: Convert string to char for ascii
body: <p>I want to ask for word from the user and then convert the word from string to char using 'strcpy'. Then I want to determine the sum of the ascii codes for all of the letters in the word.</p>
  
  <p>However, I am having difficulties. I don't understand exactly how I can do that. This is what I have been able to do so far.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;time.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  
  using namespace std;
  
  int main()
  {
      string word;
      cout &lt;&lt; "Enter word: ";
      getline(cin, word);
      /*
          char w[word];
          strcpy(w,word.c_str());
          int ('A');
          cout&lt;&lt;char(65); 
      */
      return 0;
  }
  </code></pre>
  
  <p>The commented part is where I have been trying to do the converting. I copied the code from a worksheet. Even if it did work, I don't know how, and what it all means.</p>
  
  <p>Thanks for your help.</p>