Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
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
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Does anyone have experience with dual booting on a notebook with recovery partition?
Next Topic: The eternal quarrel between Python and C
Goto Forum:
  


Current Time: Thu Mar 28 11:28:37 CET 2024

Total time taken to generate the page: 0.01364 seconds