Creating new structs on the fly
<p>I am (very) new to C++, and am having some issues understanding structs. I'm using example code from a course, so I have:</p>

<pre><code>struct Point {
   int x;
   int y;
}
</code></pre>

<p>In another bit of code, I want to write the following:</p>

<pre><code>drawLine(point1, new Point(x, y));
</code></pre>

<p>This does not work, and I understand that I am trying to declare a struct as if it were a class, but is there a way to do this? I have currently written a helper function which returns a Point from an x,y, but this seems roundabout.</p>
