Dynamic object creation
<p>I am new to c++ programming and I have a basic issue,  I want to create N  objects, N is   is actually a user input. </p>

<p>I am specific about having object names, say <em>beam1</em>, beam2,...,beamX.</p>

<p>2 quick things</p>

<ol>
<li>Is it possible in C++ to create dynamic object as this?</li>
<li><p>if it is how do we do tht? I am pasting code for your refrence..</p>

<pre><code>    #include "iostream"
    # include &lt;conio.h&gt;
    using namespace std;

    // Static member variable is defined outside the class..
    class beam {
    public:
    int length;
    };

    int main () 
    {
       int i=0, no_of_spans, j;
       cout&lt;&lt; "Design Of a Continous Beam \n1) No Of Spans : ";
       cin &gt;&gt; no_of_spans;
       for (i =0; i &lt; no_of_spans; i++) {
         j = i;
         beam;
         cout &lt;&lt; "Length of Beam" &lt;&lt; j+1 &lt;&lt; " is : ";
         cin &gt;&gt; beami.length;
       }

       cout &lt;&lt; "\nPress any key to continue..\n";
       getch ();
    }
</code></pre></li>
</ol>

<p>This is obviously a code with errors, its put up as an example to get the idea.</p>
