c - 如何在 C 中访问嵌套结构数据的值
问题描述
我是 C 编程新手,需要帮助在下面的“sum”方法中访问这个值“data”。
BigInteger sum(BigInteger A, BigInteger B) {
long data = A -> list ->headnode->data
}
列表.h
typedef struct ListObj* List;
列表.c
typedef struct NodeObj {
long data;
struct NodeObj* next;
struct NodeObj* last;
} NodeObj;
typedef NodeObj* Node;
typedef struct ListObj {
Node cursor;
Node headnode;
Node lastnode;
} ListObj;
大整数.h
typedef struct BigIntegerObj* BigInteger;
大整数.c
typedef struct BigIntegerObj {
int sign;
struct List list;
} BigIntegerObj;
解决方案
推荐阅读
- python - 如何以更快的颜色变化绘制表面?
- java - GridBagLayout - 我的列似乎比我指定的少,但为什么呢?
- angular - 如何编写模拟数据以从角度服务中获取价值
- xslt-1.0 - XSLT 1.0 将字符串中的最后 4 个字符移动到新节点
- android - Android Studio,Xml 自动完成功能不起作用
- automation - 包括在剧本的第一次播放中生成的变量
- python - 是什么导致了这个 NameError: name 'ax' is not defined in my Python code?
- vba - 在报告行源更改时动态设置文本框的格式化“ControlSource”
- c# - JSON.NET 反序列化 JSON 然后格式化字符串
- javascript - TypeError:无法读取未定义的属性“街道”