First of all I am a beginner in STL. Please apologies for any stupid mistakes!
I have a created vector<double> xpos[4] which stores double numbers. In my vector xpos[0], xpos[1], xpos[2], xpos[3] have different sizes. I would like to call and compare xpos elements and ask for each has to have at least one element at the same instant. Let me explain the following:
Expand|Select|Wrap|Line Numbers
- vector<double> xpos[4];
- vector<double> newxpos[4];
- for(int i=0; i<max_event; i++){
- for(int roc=0; roc<4; roc++){
- xpos[roc].push_back[i];
- {
- }
Expand|Select|Wrap|Line Numbers
- for(int j=0; j<4; j++){
- for(int k=0; k < xpos[0].size(); k++) {
- if(xpos[1][k] != 0. && xpos[2][k] != 0. && xpos[3][k] != 0.){
- newxpos[j].(?)
- }
- }
- }
Thanks.