![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构和C++
青锋三尺
这个作者很懒,什么都没留下…
展开
-
数据结构——结构体的注意事项
结构体定义一个单链表 方式一: typedef struct LNode { int data; //定义每个节点存放一个数据 struct LNode *next; //定义指针指向下一个节点 }LNode, *LinkList; 方式二: struct LNode{ int data; struct LNode *next; }; typedef struct LNode LNode; typedef struct LNode *LinkList;//指向struck LNode的指针原创 2020-09-21 18:36:35 · 188 阅读 · 0 评论 -
c++的“ & ”
c++的“ & ” & 对参数的修改结果会带回来 举个????: #include <iostream> using namespace std; void test(int &x){ x = 1023; printf("test内部函数x=%d\n",x); } int main() { int x = 1; printf("BEFROE CALL test内部函数x=%d\n",x); test(x); printf("AFTER CALL test内原创 2020-09-14 22:18:14 · 82 阅读 · 0 评论