title: C++: struct and new keyword
body: <p>I'm a beginner to C++, I've got the following piece of code:</p>
  
  <pre><code>struct Airline {
      string Name;
      int diameter;
      int weight;
  };
  
  Airline* myPlane = new Airline;
  </code></pre>
  
  <p>my question is when I call the method <code>new</code> it allocates memory, if I recall correctly. How does the PC know how much memory to allocate,especially given that there is a string type in there?</p>
  
  <p>Thanks</p>