flâneur — a map of the web's best reading

An Example Program Using Structs - The Rust Programming Language

doc.rust-lang.org · 1,980 words · saved by 1 readers

To understand when we might want to use structs, let’s write a program that calculates the area of a rectangle. We’ll start by using single variables, and then refactor the program until we’re using structs instead.

An Example Program Using Structs - The Rust Programming Language Keyboard shortcuts Press ← or → to navigate between chapters Press S or / to search in the book Press ? to show this help Press Esc to hide this help Auto Light Rust Coal Navy Ayu The Rust Programming Language An Example Program Using Structs To understand when we might want to use structs, let’s write a program that calculates the area of a rectangle. We’ll start by using single variables and then refactor the program until we’re using structs instead. Let’s make a new binary project with Cargo called rectangles that will take t

Explore this link on the map →

saved by

related reading