The standard way to increment is with +=, so ss += 1;.
Rust doesn't provide a ++ operator for two primary reasons:
The primary motivator for ++ is for C-style for(init;condition;increment) loops, which aren't present at all in Rust. Instead, you use for pattern in iterator, so there's no need to manually increment your iterator cursor.
The ordering rules around ++ as an expression are nonobvious, even for experienced developers. On the other hand, += is a statement[1] with always clear ordering, and barely longer than ++ as a statement.
Language lawyer minutia and pedantry below.
[1]: Well, in actuality, +=isn't a statement. place += value is an expression returning () ("unit", the type with only one value, the empty tuple). As far as I'm aware, there's only one actual statement in Rust: let[2]. Even assignment is just a ()-returning expression.
// The `&mut` means I'm passing something that can be modified by reference
// I.e. I can modify the original in place
//
// There are many types of integers: isize, usize, i32, u64, etc.
// I've chosen `isize` arbitrarily
fn increment(n: &mut isize) {
*n += 1;
}
fn main() {
let mut ss = 0;
increment(&mut ss);
println!("{}", ss);
}
I recommend reading the book to help get you started.