Skip to content

Commit

Permalink
implements hello world refs #2
Browse files Browse the repository at this point in the history
  • Loading branch information
euledge committed Feb 5, 2019
1 parent 94d08b8 commit bdfd91e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Chapter1.2/hello_world.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello World!");
}

1 comment on commit bdfd91e

@euledge
Copy link
Owner Author

@euledge euledge commented on bdfd91e Feb 5, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fn main() fnはfunctionの略
main()関数が必要なのは C,C++と同じでこれがEntryPoint

println!は 関数じゃなくてマクロだって、マクロってなんじゃ?

まあ大体 C、C++と同じと思ってよさげ

Please sign in to comment.