Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. struct Area {
  2. width: i32,
  3. height: i32
  4. }
  5.  
  6. fn main(){
  7. // Instanciamos un struct Area
  8. let area = Area{width: 100, height: 200};
  9. // Accedemos a sus propiedades mediante .
  10. println!("Width is {}", area.width);
  11. //OUTPUT Width is 100
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement