Pure Programmer
Blue Matrix


Cluster Map

Project: Bingo Lyrics

Compute the full lyrics to the song Bingo. Write a function to print a verse given the verse number.

See [[Bingo (folk song)]]

Output
$ rustc BingoLyrics.rs error[E0425]: cannot find function `strlen` in this scope --> BingoLyrics.rs:18:15 | 18 | while i < strlen(NAME) { | ^^^^^^ not found in this scope error[E0277]: the type `str` cannot be indexed by `isize` --> BingoLyrics.rs:25:25 | 25 | print!("{}", NAME[i]); | ^ string indices are ranges of `usize` | = help: the trait `SliceIndex<str>` is not implemented for `isize` = help: the trait `SliceIndex<[T]>` is implemented for `usize` = note: required for `str` to implement `Index<isize>` error[E0425]: cannot find function `strlen` in this scope --> BingoLyrics.rs:41:14 | 41 | while i <= strlen(NAME) { | ^^^^^^ not found in this scope error: aborting due to 3 previous errors Some errors have detailed explanations: E0277, E0425. For more information about an error, try `rustc --explain E0277`.

Solution