+ Reply to Thread
Results 1 to 2 of 2

Thread: How to return a value from lambda?

  1. #1
    Junior Member
    Join Date
    May 2012
    Posts
    29

    How to return a value from lambda?

    I want to know that how can I return a simple value from a lambda. Please explain it by providing some example. Thanks.

  2. #2
    Junior Member
    Join Date
    Jun 2012
    Posts
    26
    Use following code as an example to return 'integer' from a lambda.

    Code:
    int ReturnValueFromLambda()
    {
    	int nValue = [] () -> int
    				{ 
    					return 1089 ; 
    				}() ;
    
    	return nValue ;
    }

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts