摘要: char *p = "abc" //p1 指向的是字符常量,字符常量的值不能修改 阅读全文
posted @ 2019-12-05 22:42 xd_xumaomao 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 实例 #include <string.h> #include <stdio.h> int main () { void * p; int a = 10; p = &a; printf("%d\n", *((int *)p)); return(0); } 阅读全文
posted @ 2019-12-05 21:27 xd_xumaomao 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 描述 C 库函数 int atoi(const char *str) 把参数 str 所指向的字符串转换为一个整数(类型为 int 型)。 声明 下面是 atoi() 函数的声明。 int atoi(const char *str) 参数 str -- 要转换为整数的字符串。 返回值 该函数返回转换 阅读全文
posted @ 2019-12-05 17:46 xd_xumaomao 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 描述 C 库函数 char *strtok(char *str, const char *delim) 分解字符串 str 为一组字符串,delim 为分隔符。 声明 下面是 strtok() 函数的声明。 char *strtok(char *str, const char *delim) 参数 阅读全文
posted @ 2019-12-05 17:22 xd_xumaomao 阅读(652) 评论(0) 推荐(0) 编辑
摘要: tf.gather:用一个一维的索引数组,将张量中对应索引的向量提取出来 import tensorflow as tf a = tf.Variable([[1,2,3,4,5], [6,7,8,9,10], [11,12,13,14,15]]) index_a = tf.Variable([0,2 阅读全文
posted @ 2019-12-05 12:11 xd_xumaomao 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 描述 super() 函数是用于调用父类(超类)的一个方法。 super 是用来解决多重继承问题的,直接用类名调用父类方法在使用单继承的时候没问题,但是如果使用多继承,会涉及到查找顺序(MRO)、重复调用(钻石继承)等种种问题。 MRO 就是类的方法解析顺序表, 其实也就是继承父类方法时的顺序表。 阅读全文
posted @ 2019-12-05 11:29 xd_xumaomao 阅读(113) 评论(0) 推荐(0) 编辑