#include <iostream>
#include <vector>
typedef std::vector<double> Array;
class A
{
public:
A(int n);
private:
Array m;
};
#include "a.h"
A::A(int n)
{
m = Array(n, 0.0);
}
I want to initialize m in constructor A. Is the expression of parentheses some parameters immediately after the class name ( std::vector<double>) legal?
And what is the difference between Array m(n,0.0) as well m=Array(n,0.0)?
source
share