We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6964bd8 commit c823dc8Copy full SHA for c823dc8
1 file changed
DataTypes/StructExample.rs
@@ -0,0 +1,9 @@
1
+struct Point {
2
+ x: i32,
3
+ y: i32,
4
+}
5
+
6
+fn main() {
7
+ let MyPoint = Point { x: 10, y: 20 };
8
+ println!("MyPoint: x={}, y={}", MyPoint.x, MyPoint.y);
9
0 commit comments