There are three accidental (chromatic) signs/symbols namely:
– SHARP # A Sharp placed before a note raises that note by a semitone.
A Double sharp placed before a note raises the pitch of a note by two chromatic semitones. Usually used when the note to be modified is already sharpened by the key signature.
– FLAT ♭
A Flat placed before a note lowers that note by a semitone.
A Double flat placed before a note lowers the pitch of a note by two chromatic semitones. Usually used when the note to be modified is already flattened by the key signature.
– NATURAL · A Natural placed before a note restores that note that has been altered either by a sharp or flat to its original value.
In light of the above; if a sharp or flat appears before a note in a bar, the next note of its kind without a natural sign which appears in the same bar (unless its octave lower or higher) will remain a sharp without any change in sound. However, once it crosses to another bar, it returns back automatically to its initial pitch (depending on the key signature) and if you wish to maintain that accidental pitch, you will need to add another sharp or flat sign to that note in order to maintain that sound. As in: