for(int i = 0; i < 512; i++)
{
output[i].var1 = (double *)i;
output[i].var2 = (double *)i;
output[i].var3 = (double *)i;
}
shuld populate it.
zyruz
Junior Poster in Training
60 posts since Jun 2005
Reputation Points: 10
Solved Threads: 5
if you are trying wath I think you are you need to change
struct Output
{
double *var1;
double *var2;
double *var3;
}
to
struct Output
{
std::vector<double> var1;
std::vector<double> var2;
std::vector<double> var3;
}
then can you use
output[i].var1[i].push_back(double_value);
but why not just use a vector in a vector:
std::vector< std::vector > var1; ?
zyruz
Junior Poster in Training
60 posts since Jun 2005
Reputation Points: 10
Solved Threads: 5
How would you handle a structure of mixed types then?
bumsfeld
Nearly a Posting Virtuoso
1,445 posts since Jul 2005
Reputation Points: 404
Solved Threads: 184