summaryrefslogtreecommitdiff
path: root/meap/meap-code/ch6/ch6-heap-vs-stack-intro/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'meap/meap-code/ch6/ch6-heap-vs-stack-intro/src/main.rs')
-rw-r--r--meap/meap-code/ch6/ch6-heap-vs-stack-intro/src/main.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/meap/meap-code/ch6/ch6-heap-vs-stack-intro/src/main.rs b/meap/meap-code/ch6/ch6-heap-vs-stack-intro/src/main.rs
new file mode 100644
index 0000000..cb13926
--- /dev/null
+++ b/meap/meap-code/ch6/ch6-heap-vs-stack-intro/src/main.rs
@@ -0,0 +1,6 @@
+fn main() {
+ let a: i32 = 40;
+ let b: Box<i32> = Box::new(60);
+
+ println!("{} + {} = {}", a, b, a + *b);
+}