python中奇怪的符号 @ __xxx__ __xxx @python中的@即代表装饰器,为了书写简单故采用了@符号。本质上是一个带有返回函数的高阶函数(记住这几个名词,看起来很专(zhuang)业(bi))作用:在不改变原先函数的代码的情况下扩充函数的功能一个简单的例子 123456789101112131415161718192021# test 1 注释掉@add后运行def add(func): # 接收一个函数作为参数,将原来函数 2019-10-05
c++创建二维数组的方法 用malloc函数创建二维数组123456789101112131415161718int first(int row,int col) { int** array = (int**)malloc(sizeof(int*) * row); if (array != NULL) { //如果申请成功 for (int i = 0;i < row;i++) 2019-10-02