Sometimes you may get frustrated in finding what the problem with your camera is. And later you will come to know that the problem was in SD card and not in the camera. If you are getting “write error” then your photos does not get written to the card. First check your card is not locked and then try to take photos.
If your card is damaged due to dust or dirt then you may get card error. In this case make sure that the metallic part is dust free and if there is any dust then clean it with micro-fiber cloth that comes with camera for cleaning lenses. You may also use can of compressed air to clean the camera SD card slot and card, so that the they can make a good contact.
Different camera uses different format on the card. So formatting the SD card may also fix this problem. But before you format the card make sure that you take a backup of your photos from the card. You can find the “Format” Option in the menu of the camera itself.