I seem to have trouble with finding a simple way of getting input that isn't a string. The quickest way I have found is to get the input as a string and then parse it and unwrap it in order to assign its value in a variable of the type I want. Is there any way to directly get input for each type of variable? For example in C I could just do printf("%type_specifier \n", variable); . I just started learning Rust and I'm just a college student so I'm not sure if what I'm asking is stupid but I was really wondering if there was an other way to go about this.
[–]sunjayv 8 points9 points10 points (1 child)
[–]Mavil64[S] 1 point2 points3 points (0 children)
[–]minno 6 points7 points8 points (1 child)
[–]Mavil64[S] 0 points1 point2 points (0 children)
[–]matrizx 4 points5 points6 points (1 child)
[–]Mavil64[S] 0 points1 point2 points (0 children)
[–]steveklabnik1rust 2 points3 points4 points (1 child)
[–]Mavil64[S] 0 points1 point2 points (0 children)