Rust for C++

Mutability (mut)

Rust
fn function(block: &mut Block) {
    block.number = 5;
}

Run

C++
void function(Block &block) {
    block.number = 5;
}

Run