Home » Community » Coffee corner » CoWork usage question
Re: CoWork usage question [message #51092 is a reply to message #51091] |
Tue, 22 January 2019 15:15 |
Tom1
Messages: 1212 Registered: March 2007
|
Senior Contributor |
|
|
Well, the second cup of coffee solved it for me:
CoWork co;
for(int i=0;i<ICOUNT;i++){
//co & [&, i] { operation(ib[i]); }; // Reference variant
co & [&, i] { operationp(&ib[i]); }; // Pointer variant
}
co.Finish();
Must have 'copy capture' for i, or otherwise the index i will run away before used.
Sorry for bothering with such trivial issue.
Best regards,
Tom
|
|
|
Goto Forum:
Current Time: Thu Mar 28 11:28:37 CET 2024
Total time taken to generate the page: 0.01364 seconds
|