request for member `push_back' in `num', which is of non-class type `int[((unsigned int)((int)n))]'
<pre><code>#include &lt;iostream&gt;
#include &lt;vector&gt;
#include &lt;numeric&gt;
using namespace std;
std::vector&lt;float&gt; num;

float mean (float num[], float n)
{
    int i;
    float sum=0;
    for(i=0;i&lt;n;i++)
    sum=sum+num[i];
    return (sum/n);

}
int main()  
{

    int minusElements;  
    int n;
    cout &lt;&lt; "Enter number of Elements:";  
    cin &gt;&gt; n;



    minusElements = n - 1  ;
    int i,j;  
    float  temp;

    float f;
    for(i=0;i&lt;n;i++)  
    {
    cin &gt;&gt; f;
    num.push_back(f);
    }


    cout &lt;&lt; "Enter " &lt;&lt; n &lt;&lt; " numbers:\n";
    for(i=0;i&lt;n;i++)  
    cin &gt;&gt; num[i];
    cin.get();
    float m = mean(&amp;num[0], num.size());


    //if num is float[n] or float* (num of elements = n)
    float mean = std::accumulate(num, num + n, 0) / n;
    cout&lt;&lt;mean;
}  
//46 no match for 'operator+' in 'num + n' 
</code></pre>
