摘要: #include #include #include typedef struct TrieNode_t { char data; short int end_flag;//字符串完全添加标志位 struct TrieNode_t* child_node[26]; } TrieNode; TrieNode root = { 0 }; //添加字符串到树中 vo... 阅读全文
posted @ 2019-04-08 17:58 小时候挺菜 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 函数调用可能引发的问题 1. 传入getMemory(char *p, int num)函数的形参为字符串指针,在函数内部修改形参并不能真正的改变传入形参的值,执行完 后的str仍然为NULL; 毛病出在函数GetMemory 中。 编译器总是要为函数的每个参数制作临时副本,指针参数p的副本是 _p 阅读全文
posted @ 2019-04-08 10:30 小时候挺菜 阅读(172) 评论(0) 推荐(0) 编辑