Join Abhiram Ravikumar for an in-depth discussion in this video Compound data types: Arrays, part of First Look: Rust.
- [Instructor] Another way to have a collection…of multiple values is with an array.…Unlike a topple, every element of an array…must have the same type.…Arrays in Rust are different…than arrays in some other languages,…because they have a fixed length.…Once declared, they cannot grow or shrink in size.…I've forwarded an exercise file for you.…Let's go here and open that.…So if you can go to the desktop,…there's a file, folder called exercise files,…and then there's a folder called resources,…and then open this file called arrays dot RS.…
So we have a standard code here,…this a main function when in it, there's a,…array declared, so we use a left keyword…to declare the arrays, and the name of the array here…is months, and the value it has,…it's two months of the year,…so let's try to access the first month of the year.…(keys click)…So we use a print Ellen macro.…So let's say first month.…(keys click)…Quotes, and then months.…
(keys click)…The way we use arrays is similar to the way…we use arrays in other programming languages as well.…
- Installing Rust
- Data types
- Adjusting memory allocation
- Setting up race conditions
- Working with functions
- Exploring references and borrowing
- Using structs
- Method syntax
- Demonstrating recoverable errors with Result
- Working with enums
- Getting user input
Skill Level Beginner
1. Hello, Rust!
2. Basic Programming Concepts
3. Ownership in Rust
4. Data Handling and Pattern Matching in Rust
5. Error Handling
6. Sample Rust Project: The Guessing Game
Next steps1m 14s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.