动态

列表
创建 时间

C++lambda表達式簡單筆記

lambda表達式語法   #include iostream int main(int argc, char* argv[]) { /** * 1. 基本形式與語法 */ //如果沒有傳入參數,參數列表可以省略 auto lambda1 = []() { std::cout "Hello, World !" std::endl; }; auto lambda2 = [](in

创建 时间

C++ std::function簡單筆記

基本形式 #include iostream #include functional /** * 1. C++11新增的類型別名聲明方式 */ using pFunc1 = void(); //普通函數 using pFunc2 = void(int, int); //帶參數的函數 using pFunc3 = int(int, int); //帶參數和返回值的函數 us