Forgive me if this is in the wrong spot, but I came here looking for help, but helped myself before asking the question. Just want to pass this on to anyone new as me having probs.
Bought a Mega 2560 Arduino, with an eye to lighting starship models, as well as learning to program.
Found a bazillion sketches online, but could not get them to work. Seems I was missing class libraries like BlinkLED and ChaseLEDs, to name a few. After much fruitless searching, I could not find actual compiled files of these libs I needed. Plenty of pages of source, though. Tried cutting and pasting, but upon compiling, would get errors about "Stray '#' in program" and the like. This was caused by my use of wordpad, and it's addition of format characters.
That's when I registered here to ask for help. In staring at my screen, composing my questions and taking screenshots of error messages, my eyes fell upon an icon on my taskbar: NotePad++.
Of course! It's a C++ editor! Sure enough, copied and pasted, and in the "Save" dialog, there is the choice to save as C++ source files, .h and .cpp among them.
Problem solved. Just Google NotePad++ and download it, it's free, and you can add libs all day long now.
(I have NO affiliation with notepad++, other than as a user)
Hope this helps you.