rust - Rust 不打印到终端
问题描述
rustc 在使用println!
.
代码:
fn main() {
println!("Hello, world!");
}
运行它:
me@mclaptop:~
> rustc helloworld.rs
me@mclaptop:~
>
为什么它不打印任何东西?
解决方案
rustc
是 Rust 语言的编译器,它只是生成一个可以运行的可执行文件。如果您想实际查看输出,则必须运行该./helloworld
命令。
你可以在这里阅读。
推荐阅读
- json - 使用 jq 将一个 JSON 中的值附加到另一个 JSON
- python - 熊猫:从列表中创建数据框,每个元素都有重复的日期
- c# - 如何实现多个 XML 根、多个元素名称
- pdflib - pdflib - 有没有办法判断字体是否支持中文
- html - 如何在引导程序中的两个文本框之间留出空间
- autohotkey - 匹配 AutoHotKey 中按下的两个 shift 键
- android - 使用导航组件以编程方式进入/退出动画
- python-3.x - 如何通过搜索列表中给出的关键字值在 Python pandas 数据框中添加新列?
- c# - C# 可空性未正确推断
- javascript - 就像我们在 android 中与 WhatsApp 共享数据(文本/文件/IMG)一样,我们可以为桌面 WhatsApp 应用程序做同样的事情吗?