当前位置:网站首页>03.hello_ rust
03.hello_ rust
2022-06-28 20:12:00 【User 6532403】
first Rust Program .
- Create a directory first hello_rust.
- You can use handy editing (jetbrains Series can be installed rust plug-in unit , Or is it vscode Of rust All plug-ins are OK ).
- establish rust Source code file , It is to use .rs As an extension .
- stay hello.rs in , Input
fn main(){
println!("Hello Rust!")
}fn - Rust Language use fn Keywords define functions .main() Function is a predefined main function , act as Rust The entry point of the program , Every language has its own main() function . println!() yes Rust One of the languages Predefined macros . It is used to output the parameters passed to it to standard output .
notes :Rust In language macro with Exclamatory mark ( ! ) ending . See later with ! Similar function calls at the end , All are Macro call .Rust Provides a very powerful macro system , Through these macro , We can do it easily Metaprogramming .Rust Medium macro It's kind of like function . Can be macro Understood as a Enhanced version of function .
Use rustc hello.rs, Compile a to hello Binary executable with name
function ./hello, Screen output Hello Rust!
边栏推荐
- 字符和整数
- 还在付费下论文吗?快来跟我一起白piao知网
- Wechat applet_ 8. View and logic
- 新形势下的SaaS销售升级|ToB大师课
- 【学习笔记】因子分析
- Number theory -- detailed proof of Euler function, sieve method for Euler function, Euler theorem and Fermat theorem
- A few lines of code can realize complex excel import and export. This tool class is really powerful!
- 市值1200亿美金,老牌财税巨头Intuit是如何做到的?
- risc-v指令集
- 社招两年半10个公司28轮面试面经
猜你喜欢

CSDN salary increase technology selenium automated test stack summary

Shell reads the value of the JSON file

如何获取飞机穿过雷达两端的坐标

Severity code description project file line suppress status error lnk2038 detected a mismatch of "runtimelibrary": the value "md\u dynamicrelease" does not match the value "mdd\u dynamicde"

Markdown Mermaid planting grass (1)_ Introduction to Mermaid

Lecture 30 linear algebra Lecture 4 linear equations

Gaozelong, a digital economy expert: Yingke changed its name to yingcosmos. Will yuancosmos become the next growth engine of Yingke?

How to obtain the coordinates of the aircraft passing through both ends of the radar

Digital collection, ten thousand words long text, most of the questions you want to know have been clearly explained, which must be seen by practitioners
![return new int[]{i + 1, mid + 1};return {i + 1, mid + 1};](/img/6a/45a4494276deba72ef9833818229f5.png)
return new int[]{i + 1, mid + 1};return {i + 1, mid + 1};
随机推荐
[algorithm] I brushed two big factory interview questions and learned array again with tears in my eyes“
SQL server2019 create a new SQL server authentication user name and log in
2788.Cifera
Employee salary management system
压缩与解压缩命令
修复一次flutter 无法选中模拟器
Pyinstaller打包pikepdf失败的问题排查
社招两年半10个公司28轮面试面经
计网 | 一文解析TCP协议所有知识点
裁员真能拯救中国互联网?
grep文本搜索工具
关键字long
Software supply chain security risk guide for enterprise digitalization and it executives
redisTemplate
Troubleshooting of pyinstaller failed to pack pikepdf
Leetcode week 299
Win 10 create a gin framework project
R language GLM generalized linear model: logistic regression, Poisson regression fitting mouse clinical trial data (dose and response) examples and self-test questions
ArrayList of collection
ComparisonChain-文件名排序