摘要: 结构体赋值 例如: #include <stdio.h> #include <string.h> struct Inner { int x; char name[20]; }; struct Outer { int id; struct Inner inner; }; 初始化赋值(定义时): str 阅读全文
posted @ 2025-11-03 21:52 苏格拉底的落泪 阅读(19) 评论(0) 推荐(0)
摘要: static用法 1. 在 C语言 中,static 关键字用于控制变量或函数的作用域和生命周期。当它修饰函数时,含义如下: static int add(int a, int b) { return a + b; } 上面的函数前加了 static,表示这是一个 静态函数(static funct 阅读全文
posted @ 2025-11-03 20:37 苏格拉底的落泪 阅读(9) 评论(0) 推荐(0)