If it's necessary to specify an alteration that doesn't appear in the key signature:
Here are some examples:
Here is 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: