How to run loops & functions like this?

Oct 1, 2021 at 2:09pm

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 Oct 1, 2021 at 2:10pm
Oct 1, 2021 at 3:38pm
Would you mind explaining what about JLBorges' solution from http://cplusplus.com/forum/beginner/280230/ that you dislike or don't understand?
Oct 2, 2021 at 8:51am
I received an error when I posted it. I thought it didn't come through.
Topic archived. No new replies allowed.