const LANGUAGES: [&str; 5] = ["Rust", "C++", "JavaScript", "Python", "C"];
struct Skills {
programming: Vec<String>,
design: bool,
problem_solving: bool,
}
impl Skills {
fn new() -> Self {
Skills {
programming: Vec::new(),
design: false,
problem_solving: true, // cap.
}
}
fn add_language(&mut self, lang: &str) {
self.programming.push(lang.to_string());
}
}
fn main() {
let mut my_skills = Skills::new();
for lang in LANGUAGES.iter() {
my_skills.add_language(lang);
}
println!("My programming skills:");
for lang in my_skills.programming.iter() {
println!(" - {}", lang);
}
macro_rules! rahhh {
() => {
println!("This is a complex operation!");
};
}
rahhh!();
}
Pinned Loading
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.