SHARE
TWEET

Untitled

a guest Oct 19th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top