Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 1.2 Hello, world! #2

Open
euledge opened this issue Feb 5, 2019 · 2 comments
Open

Chapter 1.2 Hello, world! #2

euledge opened this issue Feb 5, 2019 · 2 comments

Comments

@euledge
Copy link
Owner

euledge commented Feb 5, 2019

最初のRustプログラムを書きましょう。新しい言語を学ぶ際に、 Hello, world!というテキストを画面に出力する小さなプログラムを書く。

@euledge
Copy link
Owner Author

euledge commented Feb 5, 2019

VSCodeで下記のソースを記述して保存

fn main() {
    println!("Hello World!");
}

euledge added a commit that referenced this issue Feb 5, 2019
@euledge
Copy link
Owner Author

euledge commented Feb 5, 2019

$ rustc hello_world.rs

でコンパイルすると

$ ls
hello_world.exe  hello_world.pdb  hello_world.rs

hello_world.exe と hello_world.pdb の2つのファイルができる。
hello_world.exe を実行すると出力される

$ ./hello_world.exe
Hello World!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant