I have a line of code inside a class's private member variables:
vector<double> dQdt(3)
When compiling in xcode, this gives an error "expected parameter declarator." I think I provided sufficient info. I don't see anything wrong with this declaration.
You have to initialize the variable in the constructor's initializer list:
class X
{
private:
vector<double> dQdt;
public:
X() : dQdt(3) {}
};
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With