Search
 
SCRIPT & CODE EXAMPLE
 

CPP

lambda - print-out array and add comment

#include <functional>
#include <array>
#include <iostream>
#include <string_view>

    std::array<int, 10> s = {5, 7, 4, 2, 8, 6, 1, 9, 0, 3};
 
    auto print = [&s](std::string_view const rem) {
        for (auto a : s) {
            std::cout << a << ' ';
        }
        std::cout << ": " << rem << '
';
    };
 
    print("Hello");
Comment

PREVIOUS NEXT
Code Example
Cpp :: font family slick 
Cpp :: The program must enter a natural number n from the console and find the number previous to n that is not divisible by 2 , 3 and 5 . 
Cpp :: frac{2}{5}MR^2 typed in c++ 
Cpp :: permutation and combination program in c++ 
Cpp :: Smooth Poti values on Arduino 
Cpp :: C++ Things to Remember 
Cpp :: Processing a string- CodeChef Solution in CPP 
Cpp :: c++ else 
Cpp :: (/~/+|/+$/g, ') 
Cpp :: Call db.close() on Button_Click (QT/C++) 
Cpp :: int a=0; int b=30; 
Cpp :: online compiler cpp 
Cpp :: c++ cout 
Cpp :: c++ & operator 
Cpp :: Basic stack implementation in c++ 
Cpp :: declare a variable in cpp 
Cpp :: in c++ 
Cpp :: frequency of characters in a string in c++ 
Cpp :: nazi crosshair c++ 
C :: c colour text 
C :: terminal count files in directory 
C :: how to make a hello world program in c 
C :: print boolean value in c 
C :: prime chec kin c 
C :: arduino client disconnect 
C :: c for schleife 
C :: string if statements c 
C :: scanf string in c 
C :: for loop in c 
C :: factorial of a number in c 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =