Creating a library

Hi. I have made a program for Arduino Uno that I want to convert to a library. I have read the tutorial for converting code to a library but I cannot find how to create the .h and the .cpp files. Is the no function for this in the Arduino program? What I did was that i saved the files with "save as" and then changed the ending in explorer, but then I could not open the files with the Arduino program. I'm sure I have missed something here and I would be very happy if someone can help me.

I tried to find more tutorials on this matter but could not find any. Is there anyone that know of another tutorial for converting code to library or maybe a thread.

but then I could not open the files with the Arduino program.

No you won't be able to unless they are in a tab. To get these files in a tab, store them in the same folder as another program and restart the arduino IDE. They will then appear in a tab when you open the other program.

What I do however is to just have these files open in a text editor and save them with the .h and .cpp extension directly into the library I am working on. Then I have and example program that calls this library and all the error messages appear when I try and run this.

There's a lot of "magic" with the IDE that I haven't quite figured out yet. I guess it's easy for casual newbies, but if you've had any experience with traditional C programming, it can throw you for a loop. I haven't had much luck putting headers in the project directory, for instance, because I'm not entirely sure what the default include paths are. "./" doesn't appear to be one of them. In my case, I've had better success making a directory under the user libraries folder instead, just like you would do with third party libraries. I assume this is "the right way" to do it anyway.

Thank you. I found a editor with tabs so I am using that like you described.