Sunday, 15 February 2015

c++ can't put data into vector -


I have a processor-class for data-structure and data, data stacked without prompt for SIMD processing Is:

  straight trojero_data {float position [3]; Float velocity [3]; Float acceleration [3]; ...}; Square trajectory_processor {private: vector & lt; Trajectory_data & gt; Tdata; Of vector & lt; Trajectory_data & gt; Default_data; ...};   

But I have actually failed to set the data set to vector, neither of those tasks:

  trajectory_processor :: trajectory_processor () {/ / Returns error: there is no match for any operator ??? In ... trajectory_data d0 (); Default_data [0] = d0; // returns error: no matching function to call to call // stat :: vector & lt; Trajectory_data & gt; :: push_back (trajectory_data (& amp;) ()) trajectory_data d1 (); Default_data.push_back (D1); }; According to   

and I thought it should be easy, but after many Google searches I still could not find any answer.

This project includes cross-coding HTML / Javascript and I think that when I go back to C ++, then it starts wearing on my nerves. "Text">

You think that, in fact, line

  trajectory_data d1 ();   

Actually declaring a function D1 which does not take any arguments and returns a trajectory_data object.

Change it

  trajectory_data d1;   

Your problem should be fixed, as well as the default constructor for d0 will be asked anyway, () .

No comments:

Post a Comment