Skip to content

witherScript/rust-first

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Person

Author: Genesis Scott

Description

Rust Person is a simple command-line application written in Rust. It prompts the user for their first name, last name, and age, creates a Person with this information, writes the Person to a text file, reads a Person from the text file, and displays the read Person.

Setup Instructions

To set up this application on your local machine, follow these steps:

  1. Ensure you have Rust installed. If not, you can download it from the official website.
  2. Clone the repository to your local machine.
  3. Navigate to the project directory.
  4. Build the project with cargo build.
  5. Run the project with cargo run.

Usage

The application is run from the command line. It will prompt you for your first name, last name, and age. It will then write this information to a text file and read it back.

Code Overview

The application's functionality is contained in a single Rust file, main.rs. This file defines a Person struct, methods for creating and displaying a Person, functions for reading user input and numbers, and functions for reading from and writing to a text file.

About

simple rust loop with person strcut

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages