How to run loops & functions like this?


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  struct DummyS {

    StuffClass* func;

  }

  vector<DummyS> dummySetting
   


  int StuffCheckie() {
  
  for (int i = 0; i < dummySetting.size(); i++) {
       //this could be a loop or function with Sleep() stuff that will delay the other dummy. 
       dummySetting.at(i).func->DoStuff(); //the problem is, I want to do "DoStuff" at the same time for all dummySettings. now it will stop for each loop to "finish". 
}

}





Last edited on
Would you mind explaining what about JLBorges' solution from http://cplusplus.com/forum/beginner/280230/ that you dislike or don't understand?
I received an error when I posted it. I thought it didn't come through.
Topic archived. No new replies allowed.