title: Strings Based on Variables
body: <p>Say I have variables <code>double x, y, z;</code> and I want to make a txt file with a name based on those variables e.g. "GenericName_x_y_z.txt".</p>
  
  <p>How would I create the string?</p>
  
  <p>I know functions like <code>printf("GenericName_%.2f_%.2f_%.2f.txt", x, y, z)</code> you can do, but how would I define a string like that, not just print it?</p>
  
  <p>So then I can use </p>
  
  <pre><code>char filename[] = "GenericName_%.2f_%.2f_%.2f.txt";
  
  FILE* fPointer;
  fPointer = fopen(filename, "w");
  </code></pre>
  
  <p>I'm sorry the phrasing is really terrible and its probably a really basic thing I'm not getting!</p>
  
  <p>Thanks</p>