title: How do I store user input as a char*?
body: <p>In my main method,</p>
  
  <pre><code>int main()
  {
          char *words = (char *)"GETGETYETYET";
          char *pattern = (char *)"GET";
          return 0;
  }
  </code></pre>
  
  <p>Instead of *words and *pattern being a predefined char set, I want to get user input, the user types in the name of a .txt file, and I want the strings in that .txt file to be stored as (char *).
  How can I do this?</p>