Rust 第乙個 Rust 程式

2022-09-18 00:36:12 字數 424 閱讀 5977

根據傳統,首先編寫乙個 hello world 程式。

參考這裡的**:

新增乙個 main.rs 檔案,並且在檔案中寫入如下的內容:

fn main()
rust 是一種編譯型語言,需要經過編譯後執行,使用rustc進行編譯。

編譯完成後,在相同的目錄下,可以找到乙個 main.exe 檔案

c:\users\jiangbo\work\workspace\rust>rustc main.rs
c:\users\jiangbo\work\workspace\rust>main

hello world

編寫了第乙個 rust 程式,並且執行了它,列印出了「hello world」。

第乙個視窗程式

程式截圖 程式 include lresult callback wndproc hwnd,uint,wparam,lparam int winapi winmain hinstance hinstance,hinstance hprevinstance,pstr szcmdline,int icm...

第乙個popcap 程式

一 tips ddimage mmapimg ddimage 上f12,定位到ddimage.h,在vs2008 中ddimage.h tab標籤上alt o 定位到ddimage.cpp 二 vs2008 中c c code generation runtime library 設成multi t...

第乙個python 程式

有人在論壇 上問 將日誌格式化的方法,剛好學python,就拿這個練手了 09 55 54 error1 tmp error log.3 50 times mon jun 28 00 00 53 2009 09 55 54 error1 tmp error log.3 50 times 09 56 ...