ios - typedef 的 swift 等价物
问题描述
在 C 语言中,我会写如下内容:
typedef struct old new;
struct old
{
int x = 0;
int y = 0;
};
我无法在 swift 中找到等价物。
请帮我
解决方案
很快它看起来像这样:
typealias new = old
struct old {
let x = 0
let y = 0
}
推荐阅读
- python-2.7 - Python:迭代列表时列表索引超出范围[使用del]
- ubuntu-12.04 - 乌尔都语到 wkhtmltopdf 的方形字符问题
- yii2 - 使用 xampp 打开现有项目
- python - 我做了一个可滚动的框布局,但它不滚动
- javascript - 函数返回一个未定义的值
- erlang - 如何在erl中为单个标志设置多个命令行参数
- linux - 无法导入 docker 或 docker-py - 没有名为 docker 的模块
- javascript - 将其元素与另一个json文件进行比较后如何更改json文件的值?
- ios - 如何提高这个使用 coreml 模型的 ios 应用程序的准确性
- flutter - Flutter - 如何在页面上动态显示或隐藏应用栏