In my rewritten example above, I had removed instances of std::cin. You can't use cin inside lamdas that are on another thread. I substituted time() to provide a somewhat unique value. If you are asking about retrieving values from the command line, use main's argc and args.
↧