use std::env;
fn main() {
let args: Vec<String> = env::args().collect(); // Turn argument iterator into a vector
println!("{:?}", args); // Prints the arguments along with the binary name
// Convert first argument to i32
let num: i32 = args[1].parse().unwrap();
}
use std::env;
fn debug() {
let DEBUG = env::var("DEBUG").is_err();
}
use std::fs;
fn read_file(file_name: &str) -> String {
fs::read_to_string(file_name)
.expect("Failed to open file {}")
}
fn main() {
let file_name = "file.txt";
read_file(file_name);
}