vector of struct

Hey Guys,

I need your help:

I have a data structure as follows:

[sub]struct LifeKf{
vector<tUInt32<Num;
};
[/sub]

And I am creating a vector of the struct LifeKf, like this:

vector<LifeKf<LifeFilter;

In my programm I am using a for-loop: for(ui16Phi = 0; ui16Phi<360; ++ui16Phi) which computes the rayNo= ui16Phi/ui16DeltaPhi +1 with ui16DeltaPhi =1 (1 Degree)

And in some parts of the programm I need to access the vector<tUInt32<Num.
Due to the fact that I don’t know the length of the vectors I have to create them dynamically with push_back. Moreover, the content of Num is not important, but the index of Num is. However, the value of Num is insofar important as in the case of emptiness, a push_back won’t be possible.

For instance I have to use this nested vector-struct data in the following way (notation is in MatLab form):

LifeFilter(ui16RayNo).Num(end+1) = k, whereas k is an integer

Please help me. I am really trying hard, but I am a beginner in C++ programming.