In figured bass, accidentals that are not in the key signature must be specified:
Here are some examples:
An example from Bach's cantata Ach, lieben Christen, seid getrost (BWV 114). We show the notes of the chords (not a good realization of the figured bass) on the treble staff. Note the use of the slash to indicate an F sharp in the first bar: